mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
Bevels on selected menu items; support for sunken bevel rendering
This commit is contained in:
parent
0be9082ea8
commit
90e652a8a1
2 changed files with 135 additions and 3 deletions
|
|
@ -194,6 +194,30 @@ struct borderset * createBuffer(uint32_t id, int size, int type, int bevelSize)
|
|||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 3: // Sunken Single bevel borders have 1x1 sides
|
||||
newBorderset->top = znew(uint32_t);
|
||||
newBorderset->left = znew(uint32_t);
|
||||
newBorderset->right = znew(uint32_t);
|
||||
newBorderset->bottom = znew(uint32_t);
|
||||
*newBorderset->top = ll32;
|
||||
*newBorderset->left = ll32;
|
||||
*newBorderset->right = hl32;
|
||||
*newBorderset->bottom = hl32;
|
||||
|
||||
// Fill with solid
|
||||
for (int j=0; j<size;j++) {
|
||||
for (int k=0; k<size;k++) {
|
||||
newBorderset->tl[PIXELSIZED(j, k, size)] = ll32;
|
||||
newBorderset->tr[PIXELSIZED(size - 1 - j, k, size)] = (j > k) ? ll32 : hl32;
|
||||
newBorderset->bl[PIXELSIZED(size - 1 -j, k, size)] = (j > k) ? ll32 : hl32;
|
||||
newBorderset->br[PIXELSIZED(j, k, size)] = hl32;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue