mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
GScrollBar: Start looking a bit more like a proper scrollbar.
And hook up FileManager's DirectoryView with its scrollbar so it actually causes the directory view to shift up and down. Very cool. :^)
This commit is contained in:
parent
1f355f2a79
commit
6a3ff7efc5
2 changed files with 14 additions and 10 deletions
|
@ -81,20 +81,16 @@ void GScrollBar::paint_event(GPaintEvent&)
|
|||
{
|
||||
Painter painter(*this);
|
||||
|
||||
painter.fill_rect(rect(), Color(0xc0c0c0));
|
||||
painter.fill_rect(rect(), Color::MidGray);
|
||||
|
||||
painter.draw_rect(up_button_rect(), Color::DarkGray, true);
|
||||
painter.fill_rect(up_button_rect().shrunken(2, 2), Color::LightGray);
|
||||
painter.fill_rect_with_gradient(up_button_rect().shrunken(2, 2), Color::LightGray, Color::White);
|
||||
|
||||
painter.draw_rect(down_button_rect(), Color::DarkGray, true);
|
||||
painter.fill_rect(down_button_rect().shrunken(2, 2), Color::LightGray);
|
||||
painter.fill_rect_with_gradient(down_button_rect().shrunken(2, 2), Color::LightGray, Color::White);
|
||||
|
||||
painter.fill_rect(pgup_rect(), Color::Magenta);
|
||||
painter.fill_rect(pgdn_rect(), Color::Yellow);
|
||||
|
||||
painter.fill_rect(scrubber_rect(), Color::Red);
|
||||
|
||||
dbgprintf("Paint!\n");
|
||||
painter.draw_rect(scrubber_rect(), Color::White, true);
|
||||
painter.fill_rect_with_gradient(scrubber_rect().shrunken(2, 2), Color::LightGray, Color::White);
|
||||
}
|
||||
|
||||
void GScrollBar::mousedown_event(GMouseEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue