Преглед на файлове

LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStyle

Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.

Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.

Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
thankyouverycool преди 2 години
родител
ревизия
f7e034d4b2
променени са 58 файла, в които са добавени 149 реда и са изтрити 209 реда
  1. 1 1
      Userland/Applets/Audio/main.cpp
  2. 1 1
      Userland/Applets/ResourceGraph/main.cpp
  3. 1 1
      Userland/Applets/WorkspacePicker/DesktopStatusWindow.cpp
  4. 1 1
      Userland/Applications/Assistant/main.cpp
  5. 4 5
      Userland/Applications/Browser/BrowserWindow.cpp
  6. 1 3
      Userland/Applications/Browser/Tab.gml
  7. 1 4
      Userland/Applications/Calculator/CalculatorWidget.cpp
  8. 1 3
      Userland/Applications/ClockSettings/ClockSettingsWidget.gml
  9. 3 9
      Userland/Applications/DisplaySettings/FontSettings.gml
  10. 1 2
      Userland/Applications/FileManager/DirectoryView.cpp
  11. 1 3
      Userland/Applications/FileManager/main.cpp
  12. 1 3
      Userland/Applications/FontEditor/FontPreviewWindow.gml
  13. 1 1
      Userland/Applications/ImageViewer/main.cpp
  14. 1 2
      Userland/Applications/PixelPaint/FilterParams.h
  15. 1 1
      Userland/Applications/PixelPaint/LayerListWidget.cpp
  16. 1 3
      Userland/Applications/PixelPaint/PaletteWidget.cpp
  17. 1 1
      Userland/Applications/Presenter/PresenterWidget.cpp
  18. 1 1
      Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
  19. 1 3
      Userland/Applications/TerminalSettings/TerminalSettingsView.gml
  20. 1 1
      Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp
  21. 0 1
      Userland/Demos/ModelGallery/BasicModelTab.gml
  22. 3 9
      Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml
  23. 1 3
      Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml
  24. 6 15
      Userland/Demos/WidgetGallery/GalleryWidget.cpp
  25. 0 1
      Userland/Demos/WidgetGallery/GalleryWidget.h
  26. 2 6
      Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.gml
  27. 1 1
      Userland/DevTools/Profiler/FlameGraphView.cpp
  28. 1 2
      Userland/DevTools/Profiler/TimelineHeader.cpp
  29. 1 1
      Userland/DevTools/Profiler/TimelineTrack.cpp
  30. 1 1
      Userland/Games/Chess/PromotionDialog.cpp
  31. 1 3
      Userland/Libraries/LibGUI/Application.cpp
  32. 1 2
      Userland/Libraries/LibGUI/AutocompleteProvider.cpp
  33. 2 3
      Userland/Libraries/LibGUI/ComboBox.cpp
  34. 1 1
      Userland/Libraries/LibGUI/CommandPalette.cpp
  35. 1 1
      Userland/Libraries/LibGUI/EmojiInputDialog.gml
  36. 32 21
      Userland/Libraries/LibGUI/Frame.cpp
  37. 5 11
      Userland/Libraries/LibGUI/Frame.h
  38. 1 1
      Userland/Libraries/LibGUI/GroupBox.cpp
  39. 1 3
      Userland/Libraries/LibGUI/ImageWidget.cpp
  40. 1 5
      Userland/Libraries/LibGUI/Label.cpp
  41. 1 1
      Userland/Libraries/LibGUI/ModelEditingDelegate.h
  42. 1 1
      Userland/Libraries/LibGUI/OpacitySlider.cpp
  43. 1 1
      Userland/Libraries/LibGUI/Slider.cpp
  44. 3 3
      Userland/Libraries/LibGUI/Statusbar.cpp
  45. 2 3
      Userland/Libraries/LibGUI/Statusbar.h
  46. 3 3
      Userland/Libraries/LibGUI/TabWidget.cpp
  47. 1 5
      Userland/Libraries/LibGUI/ToolbarContainer.cpp
  48. 1 1
      Userland/Libraries/LibGUI/ValueSlider.cpp
  49. 28 26
      Userland/Libraries/LibGfx/ClassicStylePainter.cpp
  50. 1 1
      Userland/Libraries/LibGfx/ClassicStylePainter.h
  51. 2 2
      Userland/Libraries/LibGfx/StylePainter.cpp
  52. 11 11
      Userland/Libraries/LibGfx/StylePainter.h
  53. 1 1
      Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp
  54. 1 1
      Userland/Libraries/LibWeb/Painting/ProgressPaintable.cpp
  55. 2 4
      Userland/Services/Taskbar/ClockWidget.cpp
  56. 1 1
      Userland/Services/Taskbar/QuickLaunchWidget.cpp
  57. 1 3
      Userland/Services/Taskbar/TaskbarWindow.cpp
  58. 1 1
      Userland/Services/WindowServer/WindowSwitcher.cpp

+ 1 - 1
Userland/Applets/Audio/main.cpp

@@ -83,7 +83,7 @@ private:
         m_root_container = TRY(m_slider_window->set_main_widget<GUI::Frame>());
         m_root_container = TRY(m_slider_window->set_main_widget<GUI::Frame>());
         m_root_container->set_fill_with_background_color(true);
         m_root_container->set_fill_with_background_color(true);
         m_root_container->set_layout<GUI::VerticalBoxLayout>(4, 0);
         m_root_container->set_layout<GUI::VerticalBoxLayout>(4, 0);
-        m_root_container->set_frame_shape(Gfx::FrameShape::Window);
+        m_root_container->set_frame_style(Gfx::FrameStyle::Window);
 
 
         m_percent_box = m_root_container->add<GUI::CheckBox>("\xE2\x84\xB9"_short_string);
         m_percent_box = m_root_container->add<GUI::CheckBox>("\xE2\x84\xB9"_short_string);
         m_percent_box->set_tooltip(m_show_percent ? "Hide percent" : "Show percent");
         m_percent_box->set_tooltip(m_show_percent ? "Hide percent" : "Show percent");

+ 1 - 1
Userland/Applets/ResourceGraph/main.cpp

@@ -35,7 +35,7 @@ private:
     GraphWidget(GraphType graph_type, Optional<Gfx::Color> graph_color, Optional<Gfx::Color> graph_error_color)
     GraphWidget(GraphType graph_type, Optional<Gfx::Color> graph_color, Optional<Gfx::Color> graph_error_color)
         : m_graph_type(graph_type)
         : m_graph_type(graph_type)
     {
     {
-        set_frame_thickness(1);
+        set_frame_style(Gfx::FrameStyle::SunkenPanel);
         m_graph_color = graph_color.value_or(palette().menu_selection());
         m_graph_color = graph_color.value_or(palette().menu_selection());
         m_graph_error_color = graph_error_color.value_or(Color::Red);
         m_graph_error_color = graph_error_color.value_or(Color::Red);
         start_timer(1000);
         start_timer(1000);

+ 1 - 1
Userland/Applets/WorkspacePicker/DesktopStatusWindow.cpp

@@ -55,7 +55,7 @@ public:
                 auto rect = rect_for_desktop(row, column);
                 auto rect = rect_for_desktop(row, column);
                 painter.fill_rect(rect,
                 painter.fill_rect(rect,
                     (row == current_row() && column == current_column()) ? active_color : inactive_color);
                     (row == current_row() && column == current_column()) ? active_color : inactive_color);
-                Gfx::StylePainter::current().paint_frame(painter, rect, palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 1);
+                Gfx::StylePainter::current().paint_frame(painter, rect, palette(), Gfx::FrameStyle::SunkenPanel);
             }
             }
         }
         }
     }
     }

+ 1 - 1
Userland/Applications/Assistant/main.cpp

@@ -176,7 +176,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
 
 
     auto container = TRY(window->set_main_widget<GUI::Frame>());
     auto container = TRY(window->set_main_widget<GUI::Frame>());
     container->set_fill_with_background_color(true);
     container->set_fill_with_background_color(true);
-    container->set_frame_shape(Gfx::FrameShape::Window);
+    container->set_frame_style(Gfx::FrameStyle::Window);
     container->set_layout<GUI::VerticalBoxLayout>(8);
     container->set_layout<GUI::VerticalBoxLayout>(8);
 
 
     auto& text_box = container->add<GUI::TextBox>();
     auto& text_box = container->add<GUI::TextBox>();

+ 4 - 5
Userland/Applications/Browser/BrowserWindow.cpp

@@ -206,11 +206,10 @@ void BrowserWindow::build_menus()
             tab.m_toolbar_container->set_visible(!is_fullscreen);
             tab.m_toolbar_container->set_visible(!is_fullscreen);
             tab.m_statusbar->set_visible(!is_fullscreen);
             tab.m_statusbar->set_visible(!is_fullscreen);
 
 
-            if (is_fullscreen) {
-                tab.view().set_frame_thickness(0);
-            } else {
-                tab.view().set_frame_thickness(2);
-            }
+            if (is_fullscreen)
+                tab.view().set_frame_style(Gfx::FrameStyle::NoFrame);
+            else
+                tab.view().set_frame_style(Gfx::FrameStyle::SunkenContainer);
         },
         },
         this));
         this));
 
 

+ 1 - 3
Userland/Applications/Browser/Tab.gml

@@ -13,9 +13,7 @@
 
 
     @GUI::Frame {
     @GUI::Frame {
         name: "webdriver_banner"
         name: "webdriver_banner"
-        shape: "Box"
-        shadow: "Sunken"
-        thickness: 1
+        style: "SunkenPanel"
         preferred_height: "shrink"
         preferred_height: "shrink"
         foreground_role: "TooltipText"
         foreground_role: "TooltipText"
         background_role: "Tooltip"
         background_role: "Tooltip"

+ 1 - 4
Userland/Applications/Calculator/CalculatorWidget.cpp

@@ -25,10 +25,7 @@ CalculatorWidget::CalculatorWidget()
     m_entry->set_text_alignment(Gfx::TextAlignment::CenterRight);
     m_entry->set_text_alignment(Gfx::TextAlignment::CenterRight);
 
 
     m_label = *find_descendant_of_type_named<GUI::Label>("label");
     m_label = *find_descendant_of_type_named<GUI::Label>("label");
-
-    m_label->set_frame_shadow(Gfx::FrameShadow::Sunken);
-    m_label->set_frame_shape(Gfx::FrameShape::Container);
-    m_label->set_frame_thickness(2);
+    m_label->set_frame_style(Gfx::FrameStyle::SunkenContainer);
 
 
     for (int i = 0; i < 10; i++) {
     for (int i = 0; i < 10; i++) {
         m_digit_button[i] = *find_descendant_of_type_named<GUI::Button>(DeprecatedString::formatted("{}_button", i));
         m_digit_button[i] = *find_descendant_of_type_named<GUI::Button>(DeprecatedString::formatted("{}_button", i));

+ 1 - 3
Userland/Applications/ClockSettings/ClockSettingsWidget.gml

@@ -63,9 +63,7 @@
             }
             }
 
 
             @GUI::Label {
             @GUI::Label {
-                shape: "Container"
-                thickness: 2
-                shadow: "Sunken"
+                style: "SunkenContainer"
                 name: "clock_preview"
                 name: "clock_preview"
                 text: "12:34:56"
                 text: "12:34:56"
             }
             }

+ 3 - 9
Userland/Applications/DisplaySettings/FontSettings.gml

@@ -19,9 +19,7 @@
 
 
         @GUI::Label {
         @GUI::Label {
             background_role: "Base"
             background_role: "Base"
-            shadow: "Sunken"
-            shape: "Container"
-            thickness: 2
+            style: "SunkenContainer"
             fill_with_background_color: true
             fill_with_background_color: true
             name: "default_font_label"
             name: "default_font_label"
         }
         }
@@ -47,9 +45,7 @@
 
 
         @GUI::Label {
         @GUI::Label {
             background_role: "Base"
             background_role: "Base"
-            shadow: "Sunken"
-            shape: "Container"
-            thickness: 2
+            style: "SunkenContainer"
             fill_with_background_color: true
             fill_with_background_color: true
             name: "window_title_font_label"
             name: "window_title_font_label"
         }
         }
@@ -75,9 +71,7 @@
 
 
         @GUI::Label {
         @GUI::Label {
             background_role: "Base"
             background_role: "Base"
-            shadow: "Sunken"
-            shape: "Container"
-            thickness: 2
+            style: "SunkenContainer"
             fill_with_background_color: true
             fill_with_background_color: true
             name: "fixed_width_font_label"
             name: "fixed_width_font_label"
         }
         }

+ 1 - 2
Userland/Applications/FileManager/DirectoryView.cpp

@@ -223,8 +223,7 @@ void DirectoryView::setup_icon_view()
     };
     };
 
 
     if (is_desktop()) {
     if (is_desktop()) {
-        m_icon_view->set_frame_shape(Gfx::FrameShape::NoFrame);
-        m_icon_view->set_frame_thickness(0);
+        m_icon_view->set_frame_style(Gfx::FrameStyle::NoFrame);
         m_icon_view->set_scrollbars_enabled(false);
         m_icon_view->set_scrollbars_enabled(false);
         m_icon_view->set_fill_with_background_color(false);
         m_icon_view->set_fill_with_background_color(false);
         m_icon_view->set_draw_item_text_with_shadow(true);
         m_icon_view->set_draw_item_text_with_shadow(true);

+ 1 - 3
Userland/Applications/FileManager/main.cpp

@@ -661,9 +661,7 @@ ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, Depr
 
 
     auto& progressbar = *widget->find_descendant_of_type_named<GUI::Progressbar>("progressbar");
     auto& progressbar = *widget->find_descendant_of_type_named<GUI::Progressbar>("progressbar");
     progressbar.set_format(GUI::Progressbar::Format::ValueSlashMax);
     progressbar.set_format(GUI::Progressbar::Format::ValueSlashMax);
-    progressbar.set_frame_shape(Gfx::FrameShape::Panel);
-    progressbar.set_frame_shadow(Gfx::FrameShadow::Sunken);
-    progressbar.set_frame_thickness(1);
+    progressbar.set_frame_style(Gfx::FrameStyle::SunkenPanel);
 
 
     auto refresh_tree_view = [&] {
     auto refresh_tree_view = [&] {
         directories_model->invalidate();
         directories_model->invalidate();

+ 1 - 3
Userland/Applications/FontEditor/FontPreviewWindow.gml

@@ -8,9 +8,7 @@
         layout: @GUI::VerticalBoxLayout {
         layout: @GUI::VerticalBoxLayout {
             margins: [4]
             margins: [4]
         }
         }
-        shape: "Box"
-        shadow: "Sunken"
-        thickness: 2
+        style: "SunkenBox"
 
 
         @GUI::Label {
         @GUI::Label {
             name: "preview_label"
             name: "preview_label"

+ 1 - 1
Userland/Applications/ImageViewer/main.cpp

@@ -115,7 +115,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
     widget->on_doubleclick = [&] {
     widget->on_doubleclick = [&] {
         window->set_fullscreen(!window->is_fullscreen());
         window->set_fullscreen(!window->is_fullscreen());
         toolbar_container->set_visible(!window->is_fullscreen());
         toolbar_container->set_visible(!window->is_fullscreen());
-        widget->set_frame_thickness(window->is_fullscreen() ? 0 : 2);
+        widget->set_frame_style(window->is_fullscreen() ? Gfx::FrameStyle::NoFrame : Gfx::FrameStyle::SunkenContainer);
     };
     };
 
 
     // Actions
     // Actions

+ 1 - 2
Userland/Applications/PixelPaint/FilterParams.h

@@ -49,8 +49,7 @@ private:
 
 
         resize(200, 250);
         resize(200, 250);
         auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
         auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
-        main_widget->set_frame_shape(Gfx::FrameShape::Container);
-        main_widget->set_frame_shadow(Gfx::FrameShadow::Raised);
+        main_widget->set_frame_style(Gfx::FrameStyle::RaisedContainer);
         main_widget->set_fill_with_background_color(true);
         main_widget->set_fill_with_background_color(true);
         main_widget->template set_layout<GUI::VerticalBoxLayout>(4);
         main_widget->template set_layout<GUI::VerticalBoxLayout>(4);
 
 

+ 1 - 1
Userland/Applications/PixelPaint/LayerListWidget.cpp

@@ -183,7 +183,7 @@ void LayerListWidget::paint_event(GUI::PaintEvent& event)
     if (m_moving_gadget_index.has_value())
     if (m_moving_gadget_index.has_value())
         paint_gadget(m_gadgets[m_moving_gadget_index.value()]);
         paint_gadget(m_gadgets[m_moving_gadget_index.value()]);
 
 
-    Gfx::StylePainter::paint_frame(painter, rect(), palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Sunken, 2);
+    Gfx::StylePainter::paint_frame(painter, rect(), palette(), Gfx::FrameStyle::SunkenBox);
 }
 }
 
 
 Optional<size_t> LayerListWidget::gadget_at(Gfx::IntPoint position)
 Optional<size_t> LayerListWidget::gadget_at(Gfx::IntPoint position)

+ 1 - 3
Userland/Applications/PixelPaint/PaletteWidget.cpp

@@ -94,9 +94,7 @@ private:
 
 
 PaletteWidget::PaletteWidget()
 PaletteWidget::PaletteWidget()
 {
 {
-    set_frame_shape(Gfx::FrameShape::Panel);
-    set_frame_shadow(Gfx::FrameShadow::Raised);
-    set_frame_thickness(0);
+    set_frame_style(Gfx::FrameStyle::NoFrame);
     set_fill_with_background_color(true);
     set_fill_with_background_color(true);
 
 
     set_fixed_height(35);
     set_fixed_height(35);

+ 1 - 1
Userland/Applications/Presenter/PresenterWidget.cpp

@@ -22,7 +22,7 @@ PresenterWidget::PresenterWidget()
     set_min_size(200, 120);
     set_min_size(200, 120);
     set_fill_with_background_color(true);
     set_fill_with_background_color(true);
     m_web_view = add<WebView::OutOfProcessWebView>();
     m_web_view = add<WebView::OutOfProcessWebView>();
-    m_web_view->set_frame_thickness(0);
+    m_web_view->set_frame_style(Gfx::FrameStyle::NoFrame);
     m_web_view->set_scrollbars_enabled(false);
     m_web_view->set_scrollbars_enabled(false);
     m_web_view->set_focus_policy(GUI::FocusPolicy::NoFocus);
     m_web_view->set_focus_policy(GUI::FocusPolicy::NoFocus);
     m_web_view->set_content_scales_to_viewport(true);
     m_web_view->set_content_scales_to_viewport(true);

+ 1 - 1
Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp

@@ -84,7 +84,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, Vector<NonnullR
     auto inline_widget = m_inline_documentation_window->set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     auto inline_widget = m_inline_documentation_window->set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     inline_widget->set_fill_with_background_color(true);
     inline_widget->set_fill_with_background_color(true);
     inline_widget->set_layout<GUI::VerticalBoxLayout>(4);
     inline_widget->set_layout<GUI::VerticalBoxLayout>(4);
-    inline_widget->set_frame_shape(Gfx::FrameShape::Box);
+    inline_widget->set_frame_style(Gfx::FrameStyle::Plain);
     m_inline_documentation_label = inline_widget->add<GUI::Label>();
     m_inline_documentation_label = inline_widget->add<GUI::Label>();
     m_inline_documentation_label->set_fill_with_background_color(true);
     m_inline_documentation_label->set_fill_with_background_color(true);
     m_inline_documentation_label->set_autosize(false);
     m_inline_documentation_label->set_autosize(false);

+ 1 - 3
Userland/Applications/TerminalSettings/TerminalSettingsView.gml

@@ -27,9 +27,7 @@
 
 
             @GUI::Label {
             @GUI::Label {
                 background_role: "Base"
                 background_role: "Base"
-                shape: "Container"
-                shadow: "Sunken"
-                thickness: 2
+                style: "SunkenContainer"
                 fill_with_background_color: true
                 fill_with_background_color: true
                 name: "terminal_font_label"
                 name: "terminal_font_label"
             }
             }

+ 1 - 1
Userland/Applications/VideoPlayer/VideoPlayerWidget.cpp

@@ -321,7 +321,7 @@ void VideoPlayerWidget::toggle_fullscreen()
     auto* bottom_container = find_descendant_of_type_named<GUI::Widget>("bottom_container");
     auto* bottom_container = find_descendant_of_type_named<GUI::Widget>("bottom_container");
     bottom_container->set_visible(!parent_window->is_fullscreen());
     bottom_container->set_visible(!parent_window->is_fullscreen());
     auto* video_frame = find_descendant_of_type_named<VideoFrameWidget>("video_frame");
     auto* video_frame = find_descendant_of_type_named<VideoFrameWidget>("video_frame");
-    video_frame->set_frame_thickness(parent_window->is_fullscreen() ? 0 : 2);
+    video_frame->set_frame_style(parent_window->is_fullscreen() ? Gfx::FrameStyle::NoFrame : Gfx::FrameStyle::SunkenContainer);
 }
 }
 
 
 void VideoPlayerWidget::update_title()
 void VideoPlayerWidget::update_title()

+ 0 - 1
Userland/Demos/ModelGallery/BasicModelTab.gml

@@ -7,7 +7,6 @@
     @GUI::Label {
     @GUI::Label {
         text: "Here is a basic model, displayed on a table widget. Its clients are updated via granular updates. You can add or remove items with the widgets below."
         text: "Here is a basic model, displayed on a table widget. Its clients are updated via granular updates. You can add or remove items with the widgets below."
         text_alignment: "CenterLeft"
         text_alignment: "CenterLeft"
-        thickness: 2
         fixed_height: 34
         fixed_height: 34
     }
     }
 
 

+ 3 - 9
Userland/Demos/WidgetGallery/GalleryGML/BasicsTab.gml

@@ -17,9 +17,7 @@
 
 
             @GUI::Frame {
             @GUI::Frame {
                 name: "label_frame"
                 name: "label_frame"
-                shape: "Panel"
-                shadow: "Sunken"
-                thickness: 1
+                style: "SunkenPanel"
                 layout: @GUI::VerticalBoxLayout {
                 layout: @GUI::VerticalBoxLayout {
                     margins: [3, 4]
                     margins: [3, 4]
                 }
                 }
@@ -59,7 +57,7 @@
             layout: @GUI::HorizontalBoxLayout {}
             layout: @GUI::HorizontalBoxLayout {}
 
 
             @GUI::ComboBox {
             @GUI::ComboBox {
-                name: "frame_shape_combobox"
+                name: "frame_style_combobox"
                 placeholder: "Combo box"
                 placeholder: "Combo box"
             }
             }
 
 
@@ -70,11 +68,7 @@
 
 
             @GUI::VerticalSeparator {}
             @GUI::VerticalSeparator {}
 
 
-            @GUI::SpinBox {
-                name: "thickness_spinbox"
-                min: 0
-                max: 2
-            }
+            @GUI::SpinBox {}
 
 
             @GUI::SpinBox {
             @GUI::SpinBox {
                 enabled: false
                 enabled: false

+ 1 - 3
Userland/Demos/WidgetGallery/GalleryGML/SlidersTab.gml

@@ -35,10 +35,8 @@
         @GUI::HorizontalSeparator {}
         @GUI::HorizontalSeparator {}
 
 
         @GUI::Frame {
         @GUI::Frame {
-            shape: "Panel"
-            shadow: "Sunken"
+            style: "SunkenPanel"
             preferred_height: "fit"
             preferred_height: "fit"
-            thickness: 1
             layout: @GUI::VerticalBoxLayout {
             layout: @GUI::VerticalBoxLayout {
                 margins: [1]
                 margins: [1]
             }
             }

+ 6 - 15
Userland/Demos/WidgetGallery/GalleryWidget.cpp

@@ -43,22 +43,20 @@ GalleryWidget::GalleryWidget()
     m_label_frame = basics_tab->find_descendant_of_type_named<GUI::Frame>("label_frame");
     m_label_frame = basics_tab->find_descendant_of_type_named<GUI::Frame>("label_frame");
 
 
     m_frame_shapes.append("No Frame");
     m_frame_shapes.append("No Frame");
-    m_frame_shapes.append("Plain Box");
-    m_frame_shapes.append("Plain Container");
-    m_frame_shapes.append("Plain Panel");
+    m_frame_shapes.append("Window");
+    m_frame_shapes.append("Plain");
     m_frame_shapes.append("Raised Box");
     m_frame_shapes.append("Raised Box");
-    m_frame_shapes.append("Raised Container");
-    m_frame_shapes.append("Raised Panel");
     m_frame_shapes.append("Sunken Box");
     m_frame_shapes.append("Sunken Box");
+    m_frame_shapes.append("Raised Container");
     m_frame_shapes.append("Sunken Container");
     m_frame_shapes.append("Sunken Container");
+    m_frame_shapes.append("Raised Panel");
     m_frame_shapes.append("Sunken Panel");
     m_frame_shapes.append("Sunken Panel");
 
 
-    m_frame_shape_combobox = basics_tab->find_descendant_of_type_named<GUI::ComboBox>("frame_shape_combobox");
+    m_frame_shape_combobox = basics_tab->find_descendant_of_type_named<GUI::ComboBox>("frame_style_combobox");
     m_frame_shape_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_frame_shapes));
     m_frame_shape_combobox->set_model(*GUI::ItemListModel<DeprecatedString>::create(m_frame_shapes));
 
 
     m_frame_shape_combobox->on_change = [&](auto&, auto const& index) {
     m_frame_shape_combobox->on_change = [&](auto&, auto const& index) {
-        m_label_frame->set_frame_shape(static_cast<Gfx::FrameShape>((index.row() - 1) % 3 + 1));
-        m_label_frame->set_frame_shadow(static_cast<Gfx::FrameShadow>((index.row() - 1) / 3));
+        m_label_frame->set_frame_style(static_cast<Gfx::FrameStyle>(index.row()));
         m_label_frame->update();
         m_label_frame->update();
     };
     };
 
 
@@ -66,13 +64,6 @@ GalleryWidget::GalleryWidget()
         m_enabled_label->set_text(String::from_deprecated_string(m_frame_shape_combobox->text()).release_value_but_fixme_should_propagate_errors());
         m_enabled_label->set_text(String::from_deprecated_string(m_frame_shape_combobox->text()).release_value_but_fixme_should_propagate_errors());
     };
     };
 
 
-    m_thickness_spinbox = basics_tab->find_descendant_of_type_named<GUI::SpinBox>("thickness_spinbox");
-    m_thickness_spinbox->set_value(1);
-
-    m_thickness_spinbox->on_change = [&](auto value) {
-        m_label_frame->set_frame_thickness(value);
-    };
-
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/book-open.png"sv).release_value_but_fixme_should_propagate_errors());
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/book-open.png"sv).release_value_but_fixme_should_propagate_errors());
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/inspector-object.png"sv).release_value_but_fixme_should_propagate_errors());
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/inspector-object.png"sv).release_value_but_fixme_should_propagate_errors());
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/ladybug.png"sv).release_value_but_fixme_should_propagate_errors());
     m_button_icons.append(Gfx::Bitmap::load_from_file("/res/icons/16x16/ladybug.png"sv).release_value_but_fixme_should_propagate_errors());

+ 0 - 1
Userland/Demos/WidgetGallery/GalleryWidget.h

@@ -53,7 +53,6 @@ private:
 
 
     RefPtr<GUI::Frame> m_label_frame;
     RefPtr<GUI::Frame> m_label_frame;
     RefPtr<GUI::Label> m_enabled_label;
     RefPtr<GUI::Label> m_enabled_label;
-    RefPtr<GUI::SpinBox> m_thickness_spinbox;
     RefPtr<GUI::ColorInput> m_font_colorinput;
     RefPtr<GUI::ColorInput> m_font_colorinput;
     RefPtr<GUI::TableView> m_icons_tableview;
     RefPtr<GUI::TableView> m_icons_tableview;
     RefPtr<GUI::TableView> m_cursors_tableview;
     RefPtr<GUI::TableView> m_cursors_tableview;

+ 2 - 6
Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.gml

@@ -18,9 +18,7 @@
     @GUI::Label {
     @GUI::Label {
         name: "description_label"
         name: "description_label"
         text_alignment: "CenterLeft"
         text_alignment: "CenterLeft"
-        thickness: 2
-        shadow: "Sunken"
-        shape: "Container"
+        style: "SunkenContainer"
         max_height: 24
         max_height: 24
     }
     }
 
 
@@ -75,9 +73,7 @@
             name: "full_path_label"
             name: "full_path_label"
             text_alignment: "CenterLeft"
             text_alignment: "CenterLeft"
             text: ""
             text: ""
-            thickness: 2
-            shadow: "Sunken"
-            shape: "Container"
+            style: "SunkenContainer"
             max_height: 22
             max_height: 22
         }
         }
     }
     }

+ 1 - 1
Userland/DevTools/Profiler/FlameGraphView.cpp

@@ -44,7 +44,7 @@ FlameGraphView::FlameGraphView(GUI::Model& model, int text_column, int width_col
     set_fill_with_background_color(true);
     set_fill_with_background_color(true);
     set_background_role(Gfx::ColorRole::Base);
     set_background_role(Gfx::ColorRole::Base);
     set_scrollbars_enabled(true);
     set_scrollbars_enabled(true);
-    set_frame_thickness(0);
+    set_frame_style(Gfx::FrameStyle::NoFrame);
     set_should_hide_unnecessary_scrollbars(false);
     set_should_hide_unnecessary_scrollbars(false);
     horizontal_scrollbar().set_visible(false);
     horizontal_scrollbar().set_visible(false);
 
 

+ 1 - 2
Userland/DevTools/Profiler/TimelineHeader.cpp

@@ -19,8 +19,7 @@ TimelineHeader::TimelineHeader(Profile& profile, Process const& process)
     : m_profile(profile)
     : m_profile(profile)
     , m_process(process)
     , m_process(process)
 {
 {
-    set_frame_shape(Gfx::FrameShape::Panel);
-    set_frame_shadow(Gfx::FrameShadow::Raised);
+    set_frame_style(Gfx::FrameStyle::RaisedPanel);
     set_fixed_size(200, 40);
     set_fixed_size(200, 40);
     update_selection();
     update_selection();
 
 

+ 1 - 1
Userland/DevTools/Profiler/TimelineTrack.cpp

@@ -23,7 +23,7 @@ TimelineTrack::TimelineTrack(TimelineView const& view, Profile const& profile, P
     set_background_role(Gfx::ColorRole::Base);
     set_background_role(Gfx::ColorRole::Base);
     set_fixed_height(40);
     set_fixed_height(40);
     set_scale(view.scale());
     set_scale(view.scale());
-    set_frame_thickness(1);
+    set_frame_style(Gfx::FrameStyle::SunkenPanel);
 }
 }
 
 
 void TimelineTrack::set_scale(float scale)
 void TimelineTrack::set_scale(float scale)

+ 1 - 1
Userland/Games/Chess/PromotionDialog.cpp

@@ -18,7 +18,7 @@ PromotionDialog::PromotionDialog(ChessWidget& chess_widget)
     resize(70 * 4, 70);
     resize(70 * 4, 70);
 
 
     auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
-    main_widget->set_frame_shape(Gfx::FrameShape::Container);
+    main_widget->set_frame_style(Gfx::FrameStyle::SunkenContainer);
     main_widget->set_fill_with_background_color(true);
     main_widget->set_fill_with_background_color(true);
     main_widget->set_layout<GUI::HorizontalBoxLayout>();
     main_widget->set_layout<GUI::HorizontalBoxLayout>();
 
 

+ 1 - 3
Userland/Libraries/LibGUI/Application.cpp

@@ -49,9 +49,7 @@ private:
         m_label->set_background_role(Gfx::ColorRole::Tooltip);
         m_label->set_background_role(Gfx::ColorRole::Tooltip);
         m_label->set_foreground_role(Gfx::ColorRole::TooltipText);
         m_label->set_foreground_role(Gfx::ColorRole::TooltipText);
         m_label->set_fill_with_background_color(true);
         m_label->set_fill_with_background_color(true);
-        m_label->set_frame_thickness(1);
-        m_label->set_frame_shape(Gfx::FrameShape::Container);
-        m_label->set_frame_shadow(Gfx::FrameShadow::Plain);
+        m_label->set_frame_style(Gfx::FrameStyle::Plain);
         m_label->set_autosize(true);
         m_label->set_autosize(true);
     }
     }
 
 

+ 1 - 2
Userland/Libraries/LibGUI/AutocompleteProvider.cpp

@@ -97,8 +97,7 @@ AutocompleteBox::AutocompleteBox(TextEditor& editor)
     main_widget->set_layout<GUI::VerticalBoxLayout>();
     main_widget->set_layout<GUI::VerticalBoxLayout>();
 
 
     m_suggestion_view = main_widget->add<GUI::TableView>();
     m_suggestion_view = main_widget->add<GUI::TableView>();
-    m_suggestion_view->set_frame_shadow(Gfx::FrameShadow::Plain);
-    m_suggestion_view->set_frame_thickness(1);
+    m_suggestion_view->set_frame_style(Gfx::FrameStyle::Plain);
     m_suggestion_view->set_column_headers_visible(false);
     m_suggestion_view->set_column_headers_visible(false);
     m_suggestion_view->set_visible(false);
     m_suggestion_view->set_visible(false);
     m_suggestion_view->on_activation = [&](GUI::ModelIndex const& index) {
     m_suggestion_view->on_activation = [&](GUI::ModelIndex const& index) {

+ 2 - 3
Userland/Libraries/LibGUI/ComboBox.cpp

@@ -65,7 +65,7 @@ ComboBox::ComboBox()
     set_preferred_size({ SpecialDimension::OpportunisticGrow, 22 });
     set_preferred_size({ SpecialDimension::OpportunisticGrow, 22 });
 
 
     m_editor = add<ComboBoxEditor>();
     m_editor = add<ComboBoxEditor>();
-    m_editor->set_frame_thickness(0);
+    m_editor->set_frame_style(Gfx::FrameStyle::NoFrame);
     m_editor->on_return_pressed = [this] {
     m_editor->on_return_pressed = [this] {
         if (on_return_pressed)
         if (on_return_pressed)
             on_return_pressed();
             on_return_pressed();
@@ -120,8 +120,7 @@ ComboBox::ComboBox()
     m_list_view->set_should_hide_unnecessary_scrollbars(true);
     m_list_view->set_should_hide_unnecessary_scrollbars(true);
     m_list_view->set_alternating_row_colors(false);
     m_list_view->set_alternating_row_colors(false);
     m_list_view->set_hover_highlighting(true);
     m_list_view->set_hover_highlighting(true);
-    m_list_view->set_frame_thickness(1);
-    m_list_view->set_frame_shadow(Gfx::FrameShadow::Plain);
+    m_list_view->set_frame_style(Gfx::FrameStyle::Plain);
     m_list_view->set_activates_on_selection(true);
     m_list_view->set_activates_on_selection(true);
     m_list_view->on_selection_change = [this] {
     m_list_view->on_selection_change = [this] {
         VERIFY(model());
         VERIFY(model());

+ 1 - 1
Userland/Libraries/LibGUI/CommandPalette.cpp

@@ -183,7 +183,7 @@ CommandPalette::CommandPalette(GUI::Window& parent_window, ScreenPosition screen
     collect_actions(parent_window);
     collect_actions(parent_window);
 
 
     auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     auto main_widget = set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
-    main_widget->set_frame_shape(Gfx::FrameShape::Window);
+    main_widget->set_frame_style(Gfx::FrameStyle::Window);
     main_widget->set_fill_with_background_color(true);
     main_widget->set_fill_with_background_color(true);
 
 
     main_widget->set_layout<GUI::VerticalBoxLayout>(4);
     main_widget->set_layout<GUI::VerticalBoxLayout>(4);

+ 1 - 1
Userland/Libraries/LibGUI/EmojiInputDialog.gml

@@ -1,5 +1,5 @@
 @GUI::Frame {
 @GUI::Frame {
-    shape: "Window"
+    style: "Window"
     fill_with_background_color: true
     fill_with_background_color: true
     layout: @GUI::VerticalBoxLayout {
     layout: @GUI::VerticalBoxLayout {
         margins: [4]
         margins: [4]

+ 32 - 21
Userland/Libraries/LibGUI/Frame.cpp

@@ -16,40 +16,51 @@ namespace GUI {
 
 
 Frame::Frame()
 Frame::Frame()
 {
 {
-    set_frame_thickness(2);
-    set_frame_shape(Gfx::FrameShape::Container);
-    set_frame_shadow(Gfx::FrameShadow::Sunken);
-
-    REGISTER_INT_PROPERTY("thickness", frame_thickness, set_frame_thickness);
-    REGISTER_ENUM_PROPERTY("shadow", frame_shadow, set_frame_shadow, Gfx::FrameShadow,
-        { Gfx::FrameShadow::Plain, "Plain" },
-        { Gfx::FrameShadow::Raised, "Raised" },
-        { Gfx::FrameShadow::Sunken, "Sunken" });
-    REGISTER_ENUM_PROPERTY("shape", frame_shape, set_frame_shape, Gfx::FrameShape,
-        { Gfx::FrameShape::NoFrame, "NoFrame" },
-        { Gfx::FrameShape::Box, "Box" },
-        { Gfx::FrameShape::Container, "Container" },
-        { Gfx::FrameShape::Panel, "Panel" },
-        { Gfx::FrameShape::Window, "Window" });
+    set_frame_style(Gfx::FrameStyle::SunkenContainer);
+
+    REGISTER_ENUM_PROPERTY("style", frame_style, set_frame_style, Gfx::FrameStyle,
+        { Gfx::FrameStyle::NoFrame, "NoFrame" },
+        { Gfx::FrameStyle::Window, "Window" },
+        { Gfx::FrameStyle::Plain, "Plain" },
+        { Gfx::FrameStyle::RaisedBox, "RaisedBox" },
+        { Gfx::FrameStyle::SunkenBox, "SunkenBox" },
+        { Gfx::FrameStyle::RaisedContainer, "RaisedContainer" },
+        { Gfx::FrameStyle::SunkenContainer, "SunkenContainer" },
+        { Gfx::FrameStyle::RaisedPanel, "RaisedPanel" },
+        { Gfx::FrameStyle::SunkenPanel, "SunkenPanel" });
 }
 }
 
 
-void Frame::set_frame_thickness(int thickness)
+void Frame::set_frame_style(Gfx::FrameStyle style)
 {
 {
-    if (m_thickness == thickness)
+    if (m_style == style)
         return;
         return;
-    m_thickness = thickness;
-    set_grabbable_margins(thickness);
+    m_style = style;
+    set_grabbable_margins(frame_thickness());
     layout_relevant_change_occurred();
     layout_relevant_change_occurred();
 }
 }
 
 
+int Frame::frame_thickness() const
+{
+    switch (m_style) {
+    case Gfx::FrameStyle::NoFrame:
+        return 0;
+    case Gfx::FrameStyle::Plain:
+    case Gfx::FrameStyle::RaisedPanel:
+    case Gfx::FrameStyle::SunkenPanel:
+        return 1;
+    default:
+        return 2;
+    }
+}
+
 void Frame::paint_event(PaintEvent& event)
 void Frame::paint_event(PaintEvent& event)
 {
 {
-    if (m_shape == Gfx::FrameShape::NoFrame)
+    if (m_style == Gfx::FrameStyle::NoFrame)
         return;
         return;
 
 
     Painter painter(*this);
     Painter painter(*this);
     painter.add_clip_rect(event.rect());
     painter.add_clip_rect(event.rect());
-    Gfx::StylePainter::paint_frame(painter, rect(), palette(), m_shape, m_shadow, m_thickness, spans_entire_window_horizontally());
+    Gfx::StylePainter::paint_frame(painter, rect(), palette(), m_style, spans_entire_window_horizontally());
 }
 }
 
 
 Gfx::IntRect Frame::children_clip_rect() const
 Gfx::IntRect Frame::children_clip_rect() const

+ 5 - 11
Userland/Libraries/LibGUI/Frame.h

@@ -17,18 +17,14 @@ class Frame : public Widget {
 public:
 public:
     virtual ~Frame() override = default;
     virtual ~Frame() override = default;
 
 
-    int frame_thickness() const { return m_thickness; }
-    void set_frame_thickness(int thickness);
+    int frame_thickness() const;
 
 
     virtual Margins content_margins() const override { return { frame_thickness() }; }
     virtual Margins content_margins() const override { return { frame_thickness() }; }
 
 
-    Gfx::FrameShadow frame_shadow() const { return m_shadow; }
-    void set_frame_shadow(Gfx::FrameShadow shadow) { m_shadow = shadow; }
+    Gfx::FrameStyle frame_style() const { return m_style; }
+    void set_frame_style(Gfx::FrameStyle);
 
 
-    Gfx::FrameShape frame_shape() const { return m_shape; }
-    void set_frame_shape(Gfx::FrameShape shape) { m_shape = shape; }
-
-    Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; }
+    Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize size) const { return { frame_thickness(), frame_thickness(), size.width() - frame_thickness() * 2, size.height() - frame_thickness() * 2 }; }
     Gfx::IntRect frame_inner_rect() const { return frame_inner_rect_for_size(size()); }
     Gfx::IntRect frame_inner_rect() const { return frame_inner_rect_for_size(size()); }
 
 
     virtual Gfx::IntRect children_clip_rect() const override;
     virtual Gfx::IntRect children_clip_rect() const override;
@@ -38,9 +34,7 @@ protected:
     void paint_event(PaintEvent&) override;
     void paint_event(PaintEvent&) override;
 
 
 private:
 private:
-    int m_thickness { 0 };
-    Gfx::FrameShadow m_shadow { Gfx::FrameShadow::Plain };
-    Gfx::FrameShape m_shape { Gfx::FrameShape::NoFrame };
+    Gfx::FrameStyle m_style { Gfx::FrameStyle::NoFrame };
 };
 };
 
 
 }
 }

+ 1 - 1
Userland/Libraries/LibGUI/GroupBox.cpp

@@ -40,7 +40,7 @@ void GroupBox::paint_event(PaintEvent& event)
         0, (!m_title.is_empty() ? font().pixel_size_rounded_up() / 2 : 0),
         0, (!m_title.is_empty() ? font().pixel_size_rounded_up() / 2 : 0),
         width(), height() - (!m_title.is_empty() ? font().pixel_size_rounded_up() / 2 : 0)
         width(), height() - (!m_title.is_empty() ? font().pixel_size_rounded_up() / 2 : 0)
     };
     };
-    Gfx::StylePainter::paint_frame(painter, frame_rect, palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Sunken, 2);
+    Gfx::StylePainter::paint_frame(painter, frame_rect, palette(), Gfx::FrameStyle::SunkenBox);
 
 
     if (!m_title.is_empty()) {
     if (!m_title.is_empty()) {
         Gfx::IntRect text_rect { 6, 1, font().width_rounded_up(m_title) + 6, font().pixel_size_rounded_up() };
         Gfx::IntRect text_rect { 6, 1, font().width_rounded_up(m_title) + 6, font().pixel_size_rounded_up() };

+ 1 - 3
Userland/Libraries/LibGUI/ImageWidget.cpp

@@ -20,9 +20,7 @@ ImageWidget::ImageWidget(StringView)
     : m_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors())
     : m_timer(Core::Timer::try_create().release_value_but_fixme_should_propagate_errors())
 
 
 {
 {
-    set_frame_thickness(0);
-    set_frame_shadow(Gfx::FrameShadow::Plain);
-    set_frame_shape(Gfx::FrameShape::NoFrame);
+    set_frame_style(Gfx::FrameStyle::NoFrame);
     set_auto_resize(true);
     set_auto_resize(true);
 
 
     REGISTER_BOOL_PROPERTY("auto_resize", auto_resize, set_auto_resize);
     REGISTER_BOOL_PROPERTY("auto_resize", auto_resize, set_auto_resize);

+ 1 - 5
Userland/Libraries/LibGUI/Label.cpp

@@ -24,11 +24,7 @@ Label::Label(String text)
 
 
     set_preferred_size({ SpecialDimension::OpportunisticGrow });
     set_preferred_size({ SpecialDimension::OpportunisticGrow });
     set_min_size({ SpecialDimension::Shrink });
     set_min_size({ SpecialDimension::Shrink });
-
-    set_frame_thickness(0);
-    set_frame_shadow(Gfx::FrameShadow::Plain);
-    set_frame_shape(Gfx::FrameShape::NoFrame);
-
+    set_frame_style(Gfx::FrameStyle::NoFrame);
     set_foreground_role(Gfx::ColorRole::WindowText);
     set_foreground_role(Gfx::ColorRole::WindowText);
 
 
     REGISTER_STRING_PROPERTY("text", text, set_text);
     REGISTER_STRING_PROPERTY("text", text, set_text);

+ 1 - 1
Userland/Libraries/LibGUI/ModelEditingDelegate.h

@@ -79,7 +79,7 @@ public:
     virtual RefPtr<Widget> create_widget() override
     virtual RefPtr<Widget> create_widget() override
     {
     {
         auto textbox = TextBox::construct();
         auto textbox = TextBox::construct();
-        textbox->set_frame_shape(Gfx::FrameShape::NoFrame);
+        textbox->set_frame_style(Gfx::FrameStyle::NoFrame);
 
 
         textbox->on_return_pressed = [this] {
         textbox->on_return_pressed = [this] {
             commit();
             commit();

+ 1 - 1
Userland/Libraries/LibGUI/OpacitySlider.cpp

@@ -132,7 +132,7 @@ void OpacitySlider::paint_event(PaintEvent& event)
     painter.draw_text(inner_rect, percent_text, Gfx::TextAlignment::Center, Color::White);
     painter.draw_text(inner_rect, percent_text, Gfx::TextAlignment::Center, Color::White);
 
 
     // Frame
     // Frame
-    Gfx::StylePainter::paint_frame(painter, rect(), palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);
+    Gfx::StylePainter::paint_frame(painter, rect(), palette(), Gfx::FrameStyle::SunkenContainer);
 }
 }
 
 
 int OpacitySlider::value_at(Gfx::IntPoint position) const
 int OpacitySlider::value_at(Gfx::IntPoint position) const

+ 1 - 1
Userland/Libraries/LibGUI/Slider.cpp

@@ -44,7 +44,7 @@ void Slider::paint_event(PaintEvent& event)
         track_rect = { 0, inner_rect().y(), track_size(), inner_rect().height() - shadow_thickness };
         track_rect = { 0, inner_rect().y(), track_size(), inner_rect().height() - shadow_thickness };
         track_rect.center_horizontally_within(inner_rect());
         track_rect.center_horizontally_within(inner_rect());
     }
     }
-    Gfx::StylePainter::paint_frame(painter, track_rect, palette(), Gfx::FrameShape::Panel, Gfx::FrameShadow::Sunken, shadow_thickness);
+    Gfx::StylePainter::paint_frame(painter, track_rect, palette(), Gfx::FrameStyle::SunkenPanel);
     if (is_enabled())
     if (is_enabled())
         Gfx::StylePainter::paint_button(painter, knob_rect(), palette(), Gfx::ButtonStyle::Normal, false, m_knob_hovered);
         Gfx::StylePainter::paint_button(painter, knob_rect(), palette(), Gfx::ButtonStyle::Normal, false, m_knob_hovered);
     else
     else

+ 3 - 3
Userland/Libraries/LibGUI/Statusbar.cpp

@@ -85,7 +85,7 @@ void Statusbar::update_segment(size_t index)
                 m_segments[i]->set_visible(true);
                 m_segments[i]->set_visible(true);
         }
         }
         segment->set_text(String::from_utf8(segment->restored_text()).release_value_but_fixme_should_propagate_errors());
         segment->set_text(String::from_utf8(segment->restored_text()).release_value_but_fixme_should_propagate_errors());
-        segment->set_frame_shape(Gfx::FrameShape::Panel);
+        segment->set_frame_style(Gfx::FrameStyle::SunkenPanel);
         if (segment->mode() != Segment::Mode::Proportional)
         if (segment->mode() != Segment::Mode::Proportional)
             segment->set_fixed_width(segment->restored_width());
             segment->set_fixed_width(segment->restored_width());
     } else {
     } else {
@@ -94,7 +94,7 @@ void Statusbar::update_segment(size_t index)
                 m_segments[i]->set_visible(false);
                 m_segments[i]->set_visible(false);
         }
         }
         segment->set_text(String::from_utf8(segment->override_text()).release_value_but_fixme_should_propagate_errors());
         segment->set_text(String::from_utf8(segment->override_text()).release_value_but_fixme_should_propagate_errors());
-        segment->set_frame_shape(Gfx::FrameShape::NoFrame);
+        segment->set_frame_style(Gfx::FrameStyle::NoFrame);
         if (segment->mode() != Segment::Mode::Proportional)
         if (segment->mode() != Segment::Mode::Proportional)
             segment->set_fixed_width(SpecialDimension::Grow);
             segment->set_fixed_width(SpecialDimension::Grow);
     }
     }
@@ -152,7 +152,7 @@ void Statusbar::Segment::paint_event(PaintEvent& event)
     painter.add_clip_rect(event.rect());
     painter.add_clip_rect(event.rect());
 
 
     bool skip_vertical_lines = window()->is_maximized() && spans_entire_window_horizontally();
     bool skip_vertical_lines = window()->is_maximized() && spans_entire_window_horizontally();
-    Gfx::StylePainter::current().paint_frame(painter, rect(), palette(), m_shape, Gfx::FrameShadow::Sunken, m_thickness, skip_vertical_lines);
+    Gfx::StylePainter::current().paint_frame(painter, rect(), palette(), m_style, skip_vertical_lines);
 
 
     if (is_clickable())
     if (is_clickable())
         Button::paint_event(event);
         Button::paint_event(event);

+ 2 - 3
Userland/Libraries/LibGUI/Statusbar.h

@@ -48,7 +48,7 @@ public:
     private:
     private:
         Segment();
         Segment();
 
 
-        void set_frame_shape(Gfx::FrameShape shape) { m_shape = shape; }
+        void set_frame_style(Gfx::FrameStyle style) { m_style = style; }
         void set_restored_width(int width) { m_restored_width = width; }
         void set_restored_width(int width) { m_restored_width = width; }
         int restored_width() const { return m_restored_width; }
         int restored_width() const { return m_restored_width; }
         DeprecatedString const& override_text() const { return m_override_text; }
         DeprecatedString const& override_text() const { return m_override_text; }
@@ -58,9 +58,8 @@ public:
         DeprecatedString m_restored_text;
         DeprecatedString m_restored_text;
         bool m_clickable { false };
         bool m_clickable { false };
         int m_restored_width { 0 };
         int m_restored_width { 0 };
-        int m_thickness { 1 };
         Mode m_mode { Mode::Proportional };
         Mode m_mode { Mode::Proportional };
-        Gfx::FrameShape m_shape { Gfx::FrameShape::Panel };
+        Gfx::FrameStyle m_style { Gfx::FrameStyle::SunkenPanel };
     };
     };
 
 
     Segment& segment(size_t index) { return m_segments.at(index); }
     Segment& segment(size_t index) { return m_segments.at(index); }

+ 3 - 3
Userland/Libraries/LibGUI/TabWidget.cpp

@@ -243,7 +243,7 @@ void TabWidget::paint_event(PaintEvent& event)
     painter.fill_rect(event.rect(), palette().button());
     painter.fill_rect(event.rect(), palette().button());
 
 
     if (!m_container_margins.is_null()) {
     if (!m_container_margins.is_null()) {
-        Gfx::StylePainter::paint_frame(painter, container_rect(), palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Raised, 2);
+        Gfx::StylePainter::paint_frame(painter, container_rect(), palette(), Gfx::FrameStyle::RaisedContainer);
     }
     }
 
 
     auto paint_tab_icon_if_needed = [&](auto& icon, auto& button_rect, auto& text_rect) {
     auto paint_tab_icon_if_needed = [&](auto& icon, auto& button_rect, auto& text_rect) {
@@ -284,7 +284,7 @@ void TabWidget::paint_event(PaintEvent& event)
             auto close_button_rect = this->close_button_rect(i);
             auto close_button_rect = this->close_button_rect(i);
 
 
             if (hovered_close_button)
             if (hovered_close_button)
-                Gfx::StylePainter::paint_frame(painter, close_button_rect, palette(), Gfx::FrameShape::Box, pressed_close_button ? Gfx::FrameShadow::Sunken : Gfx::FrameShadow::Raised, 1);
+                Gfx::StylePainter::paint_frame(painter, close_button_rect, palette(), pressed_close_button ? Gfx::FrameStyle::SunkenPanel : Gfx::FrameStyle::RaisedPanel);
 
 
             Gfx::IntRect icon_rect { close_button_rect.x() + 3, close_button_rect.y() + 3, 6, 6 };
             Gfx::IntRect icon_rect { close_button_rect.x() + 3, close_button_rect.y() + 3, 6, 6 };
             if (!m_tabs[i].modified) {
             if (!m_tabs[i].modified) {
@@ -358,7 +358,7 @@ void TabWidget::paint_event(PaintEvent& event)
         }
         }
 
 
         if (hovered_close_button)
         if (hovered_close_button)
-            Gfx::StylePainter::paint_frame(painter, close_button_rect, palette(), Gfx::FrameShape::Box, pressed_close_button ? Gfx::FrameShadow::Sunken : Gfx::FrameShadow::Raised, 1);
+            Gfx::StylePainter::paint_frame(painter, close_button_rect, palette(), pressed_close_button ? Gfx::FrameStyle::SunkenPanel : Gfx::FrameStyle::RaisedPanel);
 
 
         Gfx::IntRect icon_rect { close_button_rect.x() + 3, close_button_rect.y() + 3, 6, 6 };
         Gfx::IntRect icon_rect { close_button_rect.x() + 3, close_button_rect.y() + 3, 6, 6 };
         if (!m_tabs[i].modified) {
         if (!m_tabs[i].modified) {

+ 1 - 5
Userland/Libraries/LibGUI/ToolbarContainer.cpp

@@ -18,11 +18,7 @@ ToolbarContainer::ToolbarContainer(Gfx::Orientation orientation)
     : m_orientation(orientation)
     : m_orientation(orientation)
 {
 {
     set_fill_with_background_color(true);
     set_fill_with_background_color(true);
-
-    set_frame_thickness(2);
-    set_frame_shape(Gfx::FrameShape::Box);
-    set_frame_shadow(Gfx::FrameShadow::Sunken);
-
+    set_frame_style(Gfx::FrameStyle::SunkenBox);
     set_layout<VerticalBoxLayout>(GUI::Margins {}, 2);
     set_layout<VerticalBoxLayout>(GUI::Margins {}, 2);
     set_shrink_to_fit(true);
     set_shrink_to_fit(true);
 }
 }

+ 1 - 1
Userland/Libraries/LibGUI/ValueSlider.cpp

@@ -87,7 +87,7 @@ void ValueSlider::paint_event(PaintEvent& event)
     unfilled_rect.set_left(knob_rect().right());
     unfilled_rect.set_left(knob_rect().right());
     painter.fill_rect(unfilled_rect, palette().base());
     painter.fill_rect(unfilled_rect, palette().base());
 
 
-    Gfx::StylePainter::paint_frame(painter, bar_rect(), palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);
+    Gfx::StylePainter::paint_frame(painter, bar_rect(), palette(), Gfx::FrameStyle::SunkenContainer);
     Gfx::StylePainter::paint_button(painter, knob_rect(), palette(), Gfx::ButtonStyle::Normal, false, m_hovered);
     Gfx::StylePainter::paint_button(painter, knob_rect(), palette(), Gfx::ButtonStyle::Normal, false, m_hovered);
 
 
     auto paint_knurl = [&](int x, int y) {
     auto paint_knurl = [&](int x, int y) {

+ 28 - 26
Userland/Libraries/LibGfx/ClassicStylePainter.cpp

@@ -241,12 +241,12 @@ void ClassicStylePainter::paint_button(Painter& painter, IntRect const& rect, Pa
     }
     }
 }
 }
 
 
-void ClassicStylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameShape shape, FrameShadow shadow, int thickness, bool skip_vertical_lines)
+void ClassicStylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameStyle style, bool skip_vertical_lines)
 {
 {
-    if (shape == Gfx::FrameShape::NoFrame)
+    if (style == Gfx::FrameStyle::NoFrame)
         return;
         return;
 
 
-    if (shape == FrameShape::Window) {
+    if (style == FrameStyle::Window) {
         StylePainter::paint_window_frame(painter, rect, palette);
         StylePainter::paint_window_frame(painter, rect, palette);
         return;
         return;
     }
     }
@@ -256,48 +256,50 @@ void ClassicStylePainter::paint_frame(Painter& painter, IntRect const& rect, Pal
     Color dark_shade = palette.threed_shadow1();
     Color dark_shade = palette.threed_shadow1();
     Color light_shade = palette.threed_highlight();
     Color light_shade = palette.threed_highlight();
 
 
-    if (shape == FrameShape::Container && thickness >= 2) {
-        if (shadow == FrameShadow::Raised) {
-            dark_shade = palette.threed_shadow2();
-        }
-    }
+    if (style == FrameStyle::RaisedContainer)
+        dark_shade = palette.threed_shadow2();
 
 
-    if (shadow == FrameShadow::Raised) {
+    switch (style) {
+    case FrameStyle::RaisedContainer:
+    case FrameStyle::RaisedBox:
+    case FrameStyle::RaisedPanel:
         top_left_color = light_shade;
         top_left_color = light_shade;
         bottom_right_color = dark_shade;
         bottom_right_color = dark_shade;
-    } else if (shadow == FrameShadow::Sunken) {
+        break;
+    case FrameStyle::SunkenContainer:
+    case FrameStyle::SunkenBox:
+    case FrameStyle::SunkenPanel:
         top_left_color = dark_shade;
         top_left_color = dark_shade;
         bottom_right_color = light_shade;
         bottom_right_color = light_shade;
-    } else if (shadow == FrameShadow::Plain) {
+        break;
+    case FrameStyle::Plain:
         top_left_color = dark_shade;
         top_left_color = dark_shade;
         bottom_right_color = dark_shade;
         bottom_right_color = dark_shade;
+        break;
+    default:
+        VERIFY_NOT_REACHED();
     }
     }
 
 
-    if (thickness >= 1) {
-        painter.draw_line(rect.top_left(), rect.top_right(), top_left_color);
-        painter.draw_line(rect.bottom_left(), rect.bottom_right(), bottom_right_color);
+    painter.draw_line(rect.top_left(), rect.top_right(), top_left_color);
+    painter.draw_line(rect.bottom_left(), rect.bottom_right(), bottom_right_color);
 
 
-        if (shape != FrameShape::Panel || !skip_vertical_lines) {
-            painter.draw_line(rect.top_left().translated(0, 1), rect.bottom_left().translated(0, -1), top_left_color);
-            painter.draw_line(rect.top_right(), rect.bottom_right().translated(0, -1), bottom_right_color);
-        }
+    if ((style != FrameStyle::SunkenPanel && style != FrameStyle::RaisedPanel) || !skip_vertical_lines) {
+        painter.draw_line(rect.top_left().translated(0, 1), rect.bottom_left().translated(0, -1), top_left_color);
+        painter.draw_line(rect.top_right(), rect.bottom_right().translated(0, -1), bottom_right_color);
     }
     }
 
 
-    if (shape == FrameShape::Container && thickness >= 2) {
+    if (style == FrameStyle::RaisedContainer || style == FrameStyle::SunkenContainer) {
         Color top_left_color;
         Color top_left_color;
         Color bottom_right_color;
         Color bottom_right_color;
         Color dark_shade = palette.threed_shadow2();
         Color dark_shade = palette.threed_shadow2();
         Color light_shade = palette.button();
         Color light_shade = palette.button();
-        if (shadow == FrameShadow::Raised) {
+        if (style == FrameStyle::RaisedContainer) {
             dark_shade = palette.threed_shadow1();
             dark_shade = palette.threed_shadow1();
             top_left_color = light_shade;
             top_left_color = light_shade;
             bottom_right_color = dark_shade;
             bottom_right_color = dark_shade;
-        } else if (shadow == FrameShadow::Sunken) {
+        } else if (style == FrameStyle::SunkenContainer) {
             top_left_color = dark_shade;
             top_left_color = dark_shade;
             bottom_right_color = light_shade;
             bottom_right_color = light_shade;
-        } else if (shadow == FrameShadow::Plain) {
-            top_left_color = dark_shade;
-            bottom_right_color = dark_shade;
         }
         }
         IntRect inner_container_frame_rect = rect.shrunken(2, 2);
         IntRect inner_container_frame_rect = rect.shrunken(2, 2);
         painter.draw_line(inner_container_frame_rect.top_left(), inner_container_frame_rect.top_right(), top_left_color);
         painter.draw_line(inner_container_frame_rect.top_left(), inner_container_frame_rect.top_right(), top_left_color);
@@ -306,7 +308,7 @@ void ClassicStylePainter::paint_frame(Painter& painter, IntRect const& rect, Pal
         painter.draw_line(inner_container_frame_rect.top_right(), inner_container_frame_rect.bottom_right().translated(0, -1), bottom_right_color);
         painter.draw_line(inner_container_frame_rect.top_right(), inner_container_frame_rect.bottom_right().translated(0, -1), bottom_right_color);
     }
     }
 
 
-    if (shape == FrameShape::Box && thickness >= 2) {
+    if (style == FrameStyle::RaisedBox || style == FrameStyle::SunkenBox) {
         swap(top_left_color, bottom_right_color);
         swap(top_left_color, bottom_right_color);
         IntRect inner_rect = rect.shrunken(2, 2);
         IntRect inner_rect = rect.shrunken(2, 2);
         painter.draw_line(inner_rect.top_left(), inner_rect.top_right(), top_left_color);
         painter.draw_line(inner_rect.top_left(), inner_rect.top_right(), top_left_color);
@@ -555,7 +557,7 @@ static constexpr Gfx::CharacterBitmap s_checked_bitmap {
 void ClassicStylePainter::paint_check_box(Painter& painter, IntRect const& rect, Palette const& palette, bool is_enabled, bool is_checked, bool is_being_pressed)
 void ClassicStylePainter::paint_check_box(Painter& painter, IntRect const& rect, Palette const& palette, bool is_enabled, bool is_checked, bool is_being_pressed)
 {
 {
     painter.fill_rect(rect, is_enabled ? palette.base() : palette.window());
     painter.fill_rect(rect, is_enabled ? palette.base() : palette.window());
-    paint_frame(painter, rect, palette, Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);
+    paint_frame(painter, rect, palette, Gfx::FrameStyle::SunkenContainer);
 
 
     if (is_being_pressed) {
     if (is_being_pressed) {
         // FIXME: This color should not be hard-coded.
         // FIXME: This color should not be hard-coded.

+ 1 - 1
Userland/Libraries/LibGfx/ClassicStylePainter.h

@@ -17,7 +17,7 @@ class ClassicStylePainter : public BaseStylePainter {
 public:
 public:
     virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false) override;
     virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false) override;
     virtual void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented) override;
     virtual void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented) override;
-    virtual void paint_frame(Painter&, IntRect const&, Palette const&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false) override;
+    virtual void paint_frame(Painter&, IntRect const&, Palette const&, FrameStyle, bool skip_vertical_lines = false) override;
     virtual void paint_window_frame(Painter&, IntRect const&, Palette const&) override;
     virtual void paint_window_frame(Painter&, IntRect const&, Palette const&) override;
     virtual void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal) override;
     virtual void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal) override;
     virtual void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed) override;
     virtual void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed) override;

+ 2 - 2
Userland/Libraries/LibGfx/StylePainter.cpp

@@ -28,9 +28,9 @@ void StylePainter::paint_button(Painter& painter, IntRect const& rect, Palette c
     current().paint_button(painter, rect, palette, button_style, pressed, hovered, checked, enabled, focused, default_button);
     current().paint_button(painter, rect, palette, button_style, pressed, hovered, checked, enabled, focused, default_button);
 }
 }
 
 
-void StylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameShape shape, FrameShadow shadow, int thickness, bool skip_vertical_lines)
+void StylePainter::paint_frame(Painter& painter, IntRect const& rect, Palette const& palette, FrameStyle style, bool skip_vertical_lines)
 {
 {
-    current().paint_frame(painter, rect, palette, shape, shadow, thickness, skip_vertical_lines);
+    current().paint_frame(painter, rect, palette, style, skip_vertical_lines);
 }
 }
 
 
 void StylePainter::paint_window_frame(Painter& painter, IntRect const& rect, Palette const& palette)
 void StylePainter::paint_window_frame(Painter& painter, IntRect const& rect, Palette const& palette)

+ 11 - 11
Userland/Libraries/LibGfx/StylePainter.h

@@ -19,17 +19,17 @@ enum class ButtonStyle {
     Coolbar,
     Coolbar,
     Tray,
     Tray,
 };
 };
-enum class FrameShadow {
-    Plain,
-    Raised,
-    Sunken
-};
-enum class FrameShape {
+
+enum class FrameStyle {
     NoFrame,
     NoFrame,
-    Box,
-    Container,
-    Panel,
     Window,
     Window,
+    Plain,
+    RaisedBox,
+    SunkenBox,
+    RaisedContainer,
+    SunkenContainer,
+    RaisedPanel,
+    SunkenPanel,
 };
 };
 
 
 // FIXME: should this be in its own header?
 // FIXME: should this be in its own header?
@@ -39,7 +39,7 @@ public:
 
 
     virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false) = 0;
     virtual void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false) = 0;
     virtual void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented) = 0;
     virtual void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented) = 0;
-    virtual void paint_frame(Painter&, IntRect const&, Palette const&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false) = 0;
+    virtual void paint_frame(Painter&, IntRect const&, Palette const&, FrameStyle, bool skip_vertical_lines = false) = 0;
     virtual void paint_window_frame(Painter&, IntRect const&, Palette const&) = 0;
     virtual void paint_window_frame(Painter&, IntRect const&, Palette const&) = 0;
     virtual void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal) = 0;
     virtual void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal) = 0;
     virtual void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed) = 0;
     virtual void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed) = 0;
@@ -58,7 +58,7 @@ public:
     // FIXME: These are here for API compatibility, we should probably remove them and move BaseStylePainter into here
     // FIXME: These are here for API compatibility, we should probably remove them and move BaseStylePainter into here
     static void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false);
     static void paint_button(Painter&, IntRect const&, Palette const&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true, bool focused = false, bool default_button = false);
     static void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented);
     static void paint_tab_button(Painter&, IntRect const&, Palette const&, bool active, bool hovered, bool enabled, GUI::TabWidget::TabPosition position, bool in_active_window, bool accented);
-    static void paint_frame(Painter&, IntRect const&, Palette const&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
+    static void paint_frame(Painter&, IntRect const&, Palette const&, FrameStyle, bool skip_vertical_lines = false);
     static void paint_window_frame(Painter&, IntRect const&, Palette const&);
     static void paint_window_frame(Painter&, IntRect const&, Palette const&);
     static void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal);
     static void paint_progressbar(Painter&, IntRect const&, Palette const&, int min, int max, int value, StringView text, Orientation = Orientation::Horizontal);
     static void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed);
     static void paint_radio_button(Painter&, IntRect const&, Palette const&, bool is_checked, bool is_being_pressed);

+ 1 - 1
Userland/Libraries/LibWeb/Painting/ImagePaintable.cpp

@@ -44,7 +44,7 @@ void ImagePaintable::paint(PaintContext& context, PaintPhase phase) const
             auto& image_element = verify_cast<HTML::HTMLImageElement>(*dom_node());
             auto& image_element = verify_cast<HTML::HTMLImageElement>(*dom_node());
             auto enclosing_rect = context.enclosing_device_rect(absolute_rect()).to_type<int>();
             auto enclosing_rect = context.enclosing_device_rect(absolute_rect()).to_type<int>();
             context.painter().set_font(Platform::FontPlugin::the().default_font());
             context.painter().set_font(Platform::FontPlugin::the().default_font());
-            Gfx::StylePainter::paint_frame(context.painter(), enclosing_rect, context.palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);
+            Gfx::StylePainter::paint_frame(context.painter(), enclosing_rect, context.palette(), Gfx::FrameStyle::SunkenContainer);
             auto alt = image_element.alt();
             auto alt = image_element.alt();
             if (alt.is_empty())
             if (alt.is_empty())
                 alt = image_element.src();
                 alt = image_element.src();

+ 1 - 1
Userland/Libraries/LibWeb/Painting/ProgressPaintable.cpp

@@ -36,7 +36,7 @@ void ProgressPaintable::paint(PaintContext& context, PaintPhase phase) const
 
 
         Gfx::StylePainter::paint_progressbar(context.painter(), progress_rect.shrunken(frame_thickness, frame_thickness).to_type<int>(), context.palette(), 0, round_to<int>(layout_box().dom_node().max()), round_to<int>(layout_box().dom_node().value()), ""sv);
         Gfx::StylePainter::paint_progressbar(context.painter(), progress_rect.shrunken(frame_thickness, frame_thickness).to_type<int>(), context.palette(), 0, round_to<int>(layout_box().dom_node().max()), round_to<int>(layout_box().dom_node().value()), ""sv);
 
 
-        Gfx::StylePainter::paint_frame(context.painter(), progress_rect.to_type<int>(), context.palette(), Gfx::FrameShape::Box, Gfx::FrameShadow::Raised, frame_thickness.value());
+        Gfx::StylePainter::paint_frame(context.painter(), progress_rect.to_type<int>(), context.palette(), Gfx::FrameStyle::RaisedBox);
     }
     }
 }
 }
 
 

+ 2 - 4
Userland/Services/Taskbar/ClockWidget.cpp

@@ -20,9 +20,7 @@ namespace Taskbar {
 
 
 ClockWidget::ClockWidget()
 ClockWidget::ClockWidget()
 {
 {
-    set_frame_shape(Gfx::FrameShape::Box);
-    set_frame_shadow(Gfx::FrameShadow::Sunken);
-    set_frame_thickness(1);
+    set_frame_style(Gfx::FrameStyle::SunkenPanel);
 
 
     update_format(Config::read_string("Taskbar"sv, "Clock"sv, "TimeFormat"sv, "%T"sv));
     update_format(Config::read_string("Taskbar"sv, "Clock"sv, "TimeFormat"sv, "%T"sv));
 
 
@@ -44,7 +42,7 @@ ClockWidget::ClockWidget()
     auto root_container = m_calendar_window->set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     auto root_container = m_calendar_window->set_main_widget<GUI::Frame>().release_value_but_fixme_should_propagate_errors();
     root_container->set_fill_with_background_color(true);
     root_container->set_fill_with_background_color(true);
     root_container->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 2, 0 }, 0);
     root_container->set_layout<GUI::VerticalBoxLayout>(GUI::Margins { 2, 0 }, 0);
-    root_container->set_frame_shape(Gfx::FrameShape::Window);
+    root_container->set_frame_style(Gfx::FrameStyle::Window);
 
 
     auto& navigation_container = root_container->add<GUI::Widget>();
     auto& navigation_container = root_container->add<GUI::Widget>();
     navigation_container.set_fixed_height(24);
     navigation_container.set_fixed_height(24);

+ 1 - 1
Userland/Services/Taskbar/QuickLaunchWidget.cpp

@@ -106,7 +106,7 @@ QuickLaunchWidget::QuickLaunchWidget()
 {
 {
     set_shrink_to_fit(true);
     set_shrink_to_fit(true);
     set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 0);
     set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 0);
-    set_frame_thickness(0);
+    set_frame_style(Gfx::FrameStyle::NoFrame);
     set_fixed_height(24);
     set_fixed_height(24);
 }
 }
 
 

+ 1 - 3
Userland/Services/Taskbar/TaskbarWindow.cpp

@@ -84,9 +84,7 @@ ErrorOr<void> TaskbarWindow::populate_taskbar()
     m_default_icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png"sv));
     m_default_icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png"sv));
 
 
     m_applet_area_container = TRY(main_widget->try_add<GUI::Frame>());
     m_applet_area_container = TRY(main_widget->try_add<GUI::Frame>());
-    m_applet_area_container->set_frame_thickness(1);
-    m_applet_area_container->set_frame_shape(Gfx::FrameShape::Box);
-    m_applet_area_container->set_frame_shadow(Gfx::FrameShadow::Sunken);
+    m_applet_area_container->set_frame_style(Gfx::FrameStyle::SunkenPanel);
 
 
     m_clock_widget = TRY(main_widget->try_add<Taskbar::ClockWidget>());
     m_clock_widget = TRY(main_widget->try_add<Taskbar::ClockWidget>());
 
 

+ 1 - 1
Userland/Services/WindowServer/WindowSwitcher.cpp

@@ -191,7 +191,7 @@ void WindowSwitcher::draw()
             rect_text_color = palette.selection_text().with_alpha(0xcc);
             rect_text_color = palette.selection_text().with_alpha(0xcc);
         } else {
         } else {
             if (static_cast<int>(index) == m_hovered_index)
             if (static_cast<int>(index) == m_hovered_index)
-                Gfx::StylePainter::paint_frame(painter, item_rect, palette, Gfx::FrameShape::Panel, Gfx::FrameShadow::Raised, 2);
+                Gfx::StylePainter::paint_frame(painter, item_rect, palette, Gfx::FrameStyle::RaisedPanel);
             text_color = Color::White;
             text_color = Color::White;
             rect_text_color = Color(Color::White).with_alpha(0xcc);
             rect_text_color = Color(Color::White).with_alpha(0xcc);
         }
         }