From 1d253880e671b8f4dfe331bc1e9868e4cdb4f56d Mon Sep 17 00:00:00 2001 From: Marcus Nilsson Date: Sat, 28 Aug 2021 20:13:25 +0200 Subject: [PATCH] PixelPaint: Tweak palette height The height of the bottom color container was cut off at the bottom. This adjusts the heights and also the primary/secondary color widget so that it's in line. --- Userland/Applications/PixelPaint/PaletteWidget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Userland/Applications/PixelPaint/PaletteWidget.cpp b/Userland/Applications/PixelPaint/PaletteWidget.cpp index ad6a64c7bc..9c2c706bce 100644 --- a/Userland/Applications/PixelPaint/PaletteWidget.cpp +++ b/Userland/Applications/PixelPaint/PaletteWidget.cpp @@ -68,19 +68,19 @@ PaletteWidget::PaletteWidget() set_frame_thickness(0); set_fill_with_background_color(true); - set_fixed_height(33); + set_fixed_height(35); m_secondary_color_widget = add(); - m_secondary_color_widget->set_relative_rect({ 0, 2, 60, 31 }); + m_secondary_color_widget->set_relative_rect({ 0, 2, 60, 33 }); m_secondary_color_widget->set_fill_with_background_color(true); m_primary_color_widget = add(); - auto rect = Gfx::IntRect(0, 0, 38, 15).centered_within(m_secondary_color_widget->relative_rect()); + auto rect = Gfx::IntRect(0, 0, 35, 17).centered_within(m_secondary_color_widget->relative_rect()); m_primary_color_widget->set_relative_rect(rect); m_primary_color_widget->set_fill_with_background_color(true); m_color_container = add(); - m_color_container->set_relative_rect(m_secondary_color_widget->relative_rect().right() + 2, 2, 500, 32); + m_color_container->set_relative_rect(m_secondary_color_widget->relative_rect().right() + 2, 2, 500, 33); m_color_container->set_layout(); m_color_container->layout()->set_spacing(1); @@ -160,6 +160,7 @@ void PaletteWidget::display_color_list(Vector const& colors) auto add_color_widget = [&](GUI::Widget& container, Color color) { auto& color_widget = container.add(color, *this); color_widget.set_fill_with_background_color(true); + color_widget.set_fixed_size(16, 16); auto pal = color_widget.palette(); pal.set_color(ColorRole::Background, color); color_widget.set_palette(pal);