mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
ClassicWindowTheme: Fix titlebar redraw issues
This fixes titlebar rects being overly large and leaving smeary undrawn areas when using a theme with a titlebar height different to 19px.
This commit is contained in:
parent
6613a4cb8c
commit
9714e61d62
Notes:
sideshowbarker
2024-07-19 18:30:16 +09:00
Committer: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9714e61d62f
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ IntRect ClassicWindowTheme::title_bar_rect(WindowType window_type, const IntRect
|
||||||
{
|
{
|
||||||
auto& title_font = Font::default_bold_font();
|
auto& title_font = Font::default_bold_font();
|
||||||
auto window_titlebar_height = palette.window_title_height();
|
auto window_titlebar_height = palette.window_title_height();
|
||||||
int total_vertical_padding = window_titlebar_height - title_font.glyph_height();
|
// FIXME: The top of the titlebar doesn't get redrawn properly if this padding is different
|
||||||
|
int total_vertical_padding = title_font.glyph_height() - 1;
|
||||||
|
|
||||||
if (window_type == WindowType::Notification)
|
if (window_type == WindowType::Notification)
|
||||||
return { window_rect.width() + 3, total_vertical_padding / 2 - 1, window_titlebar_height, window_rect.height() };
|
return { window_rect.width() + 3, total_vertical_padding / 2 - 1, window_titlebar_height, window_rect.height() };
|
||||||
|
|
Loading…
Reference in a new issue