mirror of
https://github.com/labwc/labwc.git
synced 2026-04-07 08:21:20 -04:00
Ensure we use all details of borders when caching them
This commit is contained in:
parent
fe44a2e9b3
commit
b07165f154
2 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ struct borderset {
|
|||
uint32_t id; // Base colour, but could be used as a tracking hash for images or whatever in the future
|
||||
int size; // width (since I suspect a 2px border scaled up to 20px might look weird)
|
||||
enum border_type type; // Single or double bevel
|
||||
int bevelSize; // So we can disambiguate multiple possible designs cached together
|
||||
struct lab_data_buffer *top;
|
||||
struct lab_data_buffer *left;
|
||||
struct lab_data_buffer *right;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ struct borderset * getBorders(uint32_t id, int size, enum border_type type, int
|
|||
}
|
||||
|
||||
while (current != NULL) {
|
||||
if (current->size == size && current->id == id && current->type == type) {
|
||||
if (current->size == size && current->id == id && current->type == type && current->bevelSize == bevelSize) {
|
||||
return current;
|
||||
}
|
||||
last = current;
|
||||
|
|
@ -50,6 +50,7 @@ struct borderset * createBuffer(uint32_t id, int size, enum border_type type, i
|
|||
newBorderset->id = id;
|
||||
newBorderset->size = size;
|
||||
newBorderset->type = type;
|
||||
newBorderset->bevelSize = bevelSize;
|
||||
|
||||
|
||||
// Use ID as a AARRGGBB colour
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue