mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
LibGUI: Respect TitleButtonsIconOnly in AbstractThemePreview
This commit is contained in:
parent
9b30fe9864
commit
d0aef66bcc
Notes:
sideshowbarker
2024-07-18 01:43:16 +09:00
Author: https://github.com/MacDue
Commit: d0aef66bcc
Pull-request: https://github.com/SerenityOS/serenity/pull/13782
Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 1 deletions
|
@ -139,7 +139,8 @@ void AbstractThemePreview::paint_window(StringView title, Gfx::IntRect const& re
|
|||
painter.fill_rect(rect.translated(-frame_rect.location()), m_preview_palette.color(Gfx::ColorRole::Background));
|
||||
|
||||
for (auto& button : buttons) {
|
||||
Gfx::StylePainter::paint_button(painter, button.rect, m_preview_palette, Gfx::ButtonStyle::Normal, false);
|
||||
if (!m_preview_palette.title_buttons_icon_only())
|
||||
Gfx::StylePainter::paint_button(painter, button.rect, m_preview_palette, Gfx::ButtonStyle::Normal, false);
|
||||
auto bitmap_rect = button.bitmap->rect().centered_within(button.rect);
|
||||
painter.blit(bitmap_rect.location(), *button.bitmap, button.bitmap->rect());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue