mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 02:55:07 +00:00
LibGUI: Improve GScrollBar button look a bit.
The arrows look better when they're sharp. :^)
This commit is contained in:
parent
ddd580c30f
commit
8313ce57dc
3 changed files with 36 additions and 27 deletions
|
@ -16,7 +16,7 @@ DirectoryView::DirectoryView(GWidget* parent)
|
|||
m_file_icon = GraphicsBitmap::load_from_file("/res/icons/file16.rgb", { 16, 16 });
|
||||
m_symlink_icon = GraphicsBitmap::load_from_file("/res/icons/link16.rgb", { 16, 16 });
|
||||
|
||||
m_scrollbar = new GScrollBar(this);
|
||||
m_scrollbar = new GScrollBar(Orientation::Vertical, this);
|
||||
m_scrollbar->set_step(4);
|
||||
m_scrollbar->set_big_step(30);
|
||||
m_scrollbar->on_change = [this] (int) {
|
||||
|
@ -30,7 +30,7 @@ DirectoryView::~DirectoryView()
|
|||
|
||||
void DirectoryView::resize_event(GResizeEvent& event)
|
||||
{
|
||||
m_scrollbar->set_relative_rect(event.size().width() - 16, 0, 16, event.size().height());
|
||||
m_scrollbar->set_relative_rect(event.size().width() - m_scrollbar->preferred_size().width(), 0, m_scrollbar->preferred_size().width(), event.size().height());
|
||||
}
|
||||
|
||||
void DirectoryView::open(const String& path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue