mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +00:00
ProcessManager+LibGUI: Tweak things to improve ProcessManager look.
This commit is contained in:
parent
9e5ad25188
commit
3bdb95e128
7 changed files with 20 additions and 15 deletions
|
@ -131,10 +131,10 @@ void StylePainter::paint_button(Painter& painter, const Rect& rect, ButtonStyle
|
|||
}
|
||||
}
|
||||
|
||||
void StylePainter::paint_surface(Painter& painter, const Rect& rect, bool paint_vertical_lines)
|
||||
void StylePainter::paint_surface(Painter& painter, const Rect& rect, bool paint_vertical_lines, bool paint_top_line)
|
||||
{
|
||||
painter.fill_rect({ rect.x(), rect.y() + 1, rect.width(), rect.height() - 2 }, Color::LightGray);
|
||||
painter.draw_line(rect.top_left(), rect.top_right(), Color::White);
|
||||
painter.draw_line(rect.top_left(), rect.top_right(), paint_top_line ? Color::White : Color::LightGray);
|
||||
painter.draw_line(rect.bottom_left(), rect.bottom_right(), Color::MidGray);
|
||||
if (paint_vertical_lines) {
|
||||
painter.draw_line(rect.top_left().translated(0, 1), rect.bottom_left().translated(0, -1), Color::White);
|
||||
|
@ -149,6 +149,12 @@ void StylePainter::paint_frame(Painter& painter, const Rect& rect, FrameShape sh
|
|||
Color dark_shade = Color::from_rgb(0x808080);
|
||||
Color light_shade = Color::from_rgb(0xffffff);
|
||||
|
||||
if (shape == FrameShape::Container && thickness >= 2) {
|
||||
if (shadow == FrameShadow::Raised) {
|
||||
dark_shade = Color::from_rgb(0x404040);
|
||||
}
|
||||
}
|
||||
|
||||
if (shadow == FrameShadow::Raised) {
|
||||
top_left_color = light_shade;
|
||||
bottom_right_color = dark_shade;
|
||||
|
@ -176,6 +182,7 @@ void StylePainter::paint_frame(Painter& painter, const Rect& rect, FrameShape sh
|
|||
Color dark_shade = Color::from_rgb(0x404040);
|
||||
Color light_shade = Color::from_rgb(0xc0c0c0);
|
||||
if (shadow == FrameShadow::Raised) {
|
||||
dark_shade = Color::from_rgb(0x808080);
|
||||
top_left_color = light_shade;
|
||||
bottom_right_color = dark_shade;
|
||||
} else if (shadow == FrameShadow::Sunken) {
|
||||
|
|
|
@ -11,7 +11,7 @@ class StylePainter {
|
|||
public:
|
||||
static void paint_button(Painter&, const Rect&, ButtonStyle, bool pressed, bool hovered = false, bool checked = false, bool enabled = true);
|
||||
static void paint_tab_button(Painter&, const Rect&, bool active, bool hovered, bool enabled);
|
||||
static void paint_surface(Painter&, const Rect&, bool paint_vertical_lines = true);
|
||||
static void paint_surface(Painter&, const Rect&, bool paint_vertical_lines = true, bool paint_top_line = true);
|
||||
static void paint_frame(Painter&, const Rect&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
|
||||
static void paint_menu_frame(Painter&, const Rect&);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue