mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:08:12 +00:00
LibGfx+WindowServer: Add theme flag TitleButtonsIconOnly
With this flag set to true only the icon of the title button is painted. This is useful for themes with a more non-serenity look such as Coffee and Cupertino (that currently try to hide the button).
This commit is contained in:
parent
5998e7f8a2
commit
9b30fe9864
5 changed files with 27 additions and 5 deletions
|
@ -27,7 +27,9 @@ void Button::paint(Screen& screen, Gfx::Painter& painter)
|
|||
auto palette = WindowManager::the().palette();
|
||||
Gfx::PainterStateSaver saver(painter);
|
||||
painter.translate(relative_rect().location());
|
||||
Gfx::StylePainter::paint_button(painter, rect(), palette, Gfx::ButtonStyle::Normal, m_pressed, m_hovered);
|
||||
|
||||
if (m_style == Style::Normal)
|
||||
Gfx::StylePainter::paint_button(painter, rect(), palette, Gfx::ButtonStyle::Normal, m_pressed, m_hovered);
|
||||
|
||||
if (m_icon) {
|
||||
auto& bitmap = m_icon->bitmap(screen.scale_factor());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue