diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-25 03:29:37 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-25 03:29:37 +0200 |
commit | be62b42352b8b4ca4189703e68ce97da6fa7f269 (patch) | |
tree | d4cbe9f73cd6fe070a3a6c82ef90241335222eba /SharedGraphics | |
parent | 957f8b84f2106ae9493baf02fa7fc7f7e486547a (diff) | |
download | serenity-be62b42352b8b4ca4189703e68ce97da6fa7f269.zip |
StylePainter: Remove some unused code.
Diffstat (limited to 'SharedGraphics')
-rw-r--r-- | SharedGraphics/StylePainter.cpp | 12 | ||||
-rw-r--r-- | SharedGraphics/StylePainter.h | 2 |
2 files changed, 2 insertions, 12 deletions
diff --git a/SharedGraphics/StylePainter.cpp b/SharedGraphics/StylePainter.cpp index 2674865c28..bf08fbdb57 100644 --- a/SharedGraphics/StylePainter.cpp +++ b/SharedGraphics/StylePainter.cpp @@ -65,13 +65,6 @@ static void paint_button_new(Painter& painter, const Rect& rect, bool pressed, b painter.draw_line({ 0, 0 }, { rect.width() - 2, 0 }, highlight_color2); painter.draw_line({ 0, 1 }, { 0, rect.height() - 2 }, highlight_color2); -#if 0 - // Inner highlight (this looks "too thick" to me right now..) - Color highlight_color1 = Color::from_rgb(0xffffff); - painter.draw_line({ 1, 1 }, { rect.width() - 3, 1 }, highlight_color1); - painter.draw_line({ 1, 2 }, { 1, rect.height() - 3 }, highlight_color1); -#endif - // Outer shadow painter.draw_line({ 0, rect.height() - 1 }, { rect.width() - 1, rect.height() - 1 }, shadow_color2); painter.draw_line({ rect.width() - 1, 0 }, { rect.width() - 1, rect.height() - 2 }, shadow_color2); @@ -91,9 +84,6 @@ void StylePainter::paint_button(Painter& painter, const Rect& rect, ButtonStyle Color highlight_color = Color::White; Color shadow_color = Color(96, 96, 96); - if (button_style == ButtonStyle::OldNormal) - painter.draw_rect(rect, Color::Black); - if (button_style == ButtonStyle::CoolBar && !enabled) return; @@ -111,7 +101,7 @@ void StylePainter::paint_button(Painter& painter, const Rect& rect, ButtonStyle // Bottom highlight 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 (button_style == ButtonStyle::OldNormal || (button_style == ButtonStyle::CoolBar && hovered)) { + } else if (button_style == ButtonStyle::CoolBar && hovered) { // Base painter.fill_rect({ 1, 1, rect.width() - 2, rect.height() - 2 }, button_color); diff --git a/SharedGraphics/StylePainter.h b/SharedGraphics/StylePainter.h index e3efb02252..12aab47932 100644 --- a/SharedGraphics/StylePainter.h +++ b/SharedGraphics/StylePainter.h @@ -3,7 +3,7 @@ class Painter; class Rect; -enum class ButtonStyle { Normal, CoolBar, OldNormal }; +enum class ButtonStyle { Normal, CoolBar }; enum class FrameShadow { Plain, Raised, Sunken }; enum class FrameShape { NoFrame, Box, Container, Panel, VerticalLine, HorizontalLine }; |