diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 00:47:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-29 00:47:49 +0100 |
commit | 7b2dd7e116c81b586d793a2b7b98100fe28388d7 (patch) | |
tree | 417a6be2fd5aa434790b73cf69eb357d891449ce /Servers/WindowServer/WSWindowFrame.cpp | |
parent | 19d4f4c7b54c0de0e6d13122b05f29f4810782ac (diff) | |
download | serenity-7b2dd7e116c81b586d793a2b7b98100fe28388d7.zip |
LibDraw+LibGUI: Allow changing individual colors in a Palette
Palette is now a value wrapper around a NonnullRefPtr<PaletteImpl>.
A new function, set_color(ColorRole, Color) implements a simple
copy-on-write mechanism so that we're sharing the PaletteImpl in the
common case, but allowing you to create custom palettes if you like,
by getting a GWidget's palette, modifying it, and then assigning the
modified palette to the widget via GWidget::set_palette().
Use this to make PaintBrush show its palette colors once again.
Fixes #943.
Diffstat (limited to 'Servers/WindowServer/WSWindowFrame.cpp')
-rw-r--r-- | Servers/WindowServer/WSWindowFrame.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSWindowFrame.cpp b/Servers/WindowServer/WSWindowFrame.cpp index da968a28a1..3fd3ae86d6 100644 --- a/Servers/WindowServer/WSWindowFrame.cpp +++ b/Servers/WindowServer/WSWindowFrame.cpp @@ -153,7 +153,7 @@ void WSWindowFrame::paint(Painter& painter) if (m_window.type() != WSWindowType::Normal) return; - auto& palette = WSWindowManager::the().palette(); + auto palette = WSWindowManager::the().palette(); auto& window = m_window; auto titlebar_rect = title_bar_rect(); |