mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
PixelPaint: Only update the layer thumbnail on layer bitmap changes
When a layer bitmap is modified, we don't have to repaint the whole layer gadget in the layer list, only the little thumbnail. :^)
This commit is contained in:
parent
285f0383d4
commit
fd898be51a
4 changed files with 16 additions and 5 deletions
|
@ -231,11 +231,20 @@ void LayerListWidget::image_did_remove_layer(size_t layer_index)
|
|||
relayout_gadgets();
|
||||
}
|
||||
|
||||
void LayerListWidget::image_did_modify_layer(size_t layer_index)
|
||||
void LayerListWidget::image_did_modify_layer_properties(size_t layer_index)
|
||||
{
|
||||
update(m_gadgets[layer_index].rect);
|
||||
}
|
||||
|
||||
void LayerListWidget::image_did_modify_layer_bitmap(size_t layer_index)
|
||||
{
|
||||
Gfx::IntRect adjusted_rect;
|
||||
Gfx::IntRect thumbnail_rect;
|
||||
Gfx::IntRect text_rect;
|
||||
get_gadget_rects(m_gadgets[layer_index], adjusted_rect, thumbnail_rect, text_rect);
|
||||
update(thumbnail_rect);
|
||||
}
|
||||
|
||||
void LayerListWidget::image_did_modify_layer_stack()
|
||||
{
|
||||
rebuild_gadgets();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue