1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:27:45 +00:00

Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"

I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
This commit is contained in:
Andreas Kling 2021-04-13 16:18:20 +02:00
parent 86bdfa1edf
commit a2baab38fd
141 changed files with 518 additions and 518 deletions

View file

@ -165,12 +165,12 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co
if (button_style == ButtonStyle::Normal)
return paint_button_new(painter, rect, palette, pressed, checked, hovered, enabled, focused);
if (button_style == ButtonStyle::CoolBar && !enabled)
if (button_style == ButtonStyle::Coolbar && !enabled)
return;
Color button_color = palette.button();
Color highlight_color = palette.threed_highlight();
Color shadow_color = button_style == ButtonStyle::CoolBar ? palette.threed_shadow1() : palette.threed_shadow2();
Color shadow_color = button_style == ButtonStyle::Coolbar ? palette.threed_shadow1() : palette.threed_shadow2();
PainterStateSaver saver(painter);
painter.translate(rect.location());
@ -178,7 +178,7 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co
if (pressed || checked) {
// Base
IntRect base_rect { 1, 1, rect.width() - 2, rect.height() - 2 };
if (button_style == ButtonStyle::CoolBar) {
if (button_style == ButtonStyle::Coolbar) {
if (checked && !pressed) {
painter.fill_rect_with_dither_pattern(base_rect, palette.button().lightened(1.3f), Color());
} else {
@ -194,7 +194,7 @@ void ClassicStylePainter::paint_button(Painter& painter, const IntRect& rect, co
painter.draw_line({ rect.width() - 2, 1 }, { rect.width() - 2, rect.height() - 3 }, highlight_color);
painter.draw_line({ 1, rect.height() - 2 }, { rect.width() - 2, rect.height() - 2 }, highlight_color);
} else if (hovered) {
if (button_style == ButtonStyle::CoolBar) {
if (button_style == ButtonStyle::Coolbar) {
// Base
painter.fill_rect({ 1, 1, rect.width() - 2, rect.height() - 2 }, button_color);
}
@ -313,7 +313,7 @@ void ClassicStylePainter::paint_window_frame(Painter& painter, const IntRect& re
painter.draw_line(rect.bottom_left().translated(3, -3), rect.bottom_right().translated(-3, -3), base_color);
}
void ClassicStylePainter::paint_progress_bar(Painter& painter, const IntRect& rect, const Palette& palette, int min, int max, int value, const StringView& text, Orientation orientation)
void ClassicStylePainter::paint_progressbar(Painter& painter, const IntRect& rect, const Palette& palette, int min, int max, int value, const StringView& text, Orientation orientation)
{
// First we fill the entire widget with the gradient. This incurs a bit of
// overdraw but ensures a consistent look throughout the progression.

View file

@ -40,7 +40,7 @@ public:
void paint_surface(Painter&, const IntRect&, const Palette&, bool paint_vertical_lines = true, bool paint_top_line = true) override;
void paint_frame(Painter&, const IntRect&, const Palette&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false) override;
void paint_window_frame(Painter&, const IntRect&, const Palette&) override;
void paint_progress_bar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal) override;
void paint_progressbar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal) override;
void paint_radio_button(Painter&, const IntRect&, const Palette&, bool is_checked, bool is_being_pressed) override;
void paint_check_box(Painter&, const IntRect&, const Palette&, bool is_enabled, bool is_checked, bool is_being_pressed) override;
void paint_transparency_grid(Painter&, const IntRect&, const Palette&) override;

View file

@ -143,7 +143,7 @@ public:
String active_window_shadow_path() const { return path(PathRole::ActiveWindowShadow); }
String inactive_window_shadow_path() const { return path(PathRole::InactiveWindowShadow); }
String menu_shadow_path() const { return path(PathRole::MenuShadow); }
String task_bar_shadow_path() const { return path(PathRole::TaskBarShadow); }
String taskbar_shadow_path() const { return path(PathRole::TaskbarShadow); }
String tooltip_shadow_path() const { return path(PathRole::TooltipShadow); }
Color color(ColorRole role) const { return m_impl->color(role); }

View file

@ -63,9 +63,9 @@ void StylePainter::paint_window_frame(Painter& painter, const IntRect& rect, con
current().paint_window_frame(painter, rect, palette);
}
void StylePainter::paint_progress_bar(Painter& painter, const IntRect& rect, const Palette& palette, int min, int max, int value, const StringView& text, Orientation orientation)
void StylePainter::paint_progressbar(Painter& painter, const IntRect& rect, const Palette& palette, int min, int max, int value, const StringView& text, Orientation orientation)
{
current().paint_progress_bar(painter, rect, palette, min, max, value, text, orientation);
current().paint_progressbar(painter, rect, palette, min, max, value, text, orientation);
}
void StylePainter::paint_radio_button(Painter& painter, const IntRect& rect, const Palette& palette, bool is_checked, bool is_being_pressed)

View file

@ -33,7 +33,7 @@ namespace Gfx {
enum class ButtonStyle {
Normal,
CoolBar,
Coolbar,
Tray,
};
enum class FrameShadow {
@ -60,7 +60,7 @@ public:
virtual void paint_surface(Painter&, const IntRect&, const Palette&, bool paint_vertical_lines = true, bool paint_top_line = true) = 0;
virtual void paint_frame(Painter&, const IntRect&, const Palette&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false) = 0;
virtual void paint_window_frame(Painter&, const IntRect&, const Palette&) = 0;
virtual void paint_progress_bar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal) = 0;
virtual void paint_progressbar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal) = 0;
virtual void paint_radio_button(Painter&, const IntRect&, const Palette&, bool is_checked, bool is_being_pressed) = 0;
virtual void paint_check_box(Painter&, const IntRect&, const Palette&, bool is_enabled, bool is_checked, bool is_being_pressed) = 0;
virtual void paint_transparency_grid(Painter&, const IntRect&, const Palette&) = 0;
@ -79,7 +79,7 @@ public:
static void paint_surface(Painter&, const IntRect&, const Palette&, bool paint_vertical_lines = true, bool paint_top_line = true);
static void paint_frame(Painter&, const IntRect&, const Palette&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
static void paint_window_frame(Painter&, const IntRect&, const Palette&);
static void paint_progress_bar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal);
static void paint_progressbar(Painter&, const IntRect&, const Palette&, int min, int max, int value, const StringView& text, Orientation = Orientation::Horizontal);
static void paint_radio_button(Painter&, const IntRect&, const Palette&, bool is_checked, bool is_being_pressed);
static void paint_check_box(Painter&, const IntRect&, const Palette&, bool is_enabled, bool is_checked, bool is_being_pressed);
static void paint_transparency_grid(Painter&, const IntRect&, const Palette&);

View file

@ -121,7 +121,7 @@ Core::AnonymousBuffer load_system_theme(const String& path)
DO_PATH(TitleButtonIcons, false);
DO_PATH(ActiveWindowShadow, true);
DO_PATH(InactiveWindowShadow, true);
DO_PATH(TaskBarShadow, true);
DO_PATH(TaskbarShadow, true);
DO_PATH(MenuShadow, true);
DO_PATH(TooltipShadow, true);

View file

@ -148,7 +148,7 @@ enum class PathRole {
TitleButtonIcons,
InactiveWindowShadow,
ActiveWindowShadow,
TaskBarShadow,
TaskbarShadow,
MenuShadow,
TooltipShadow,
__Count,