mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibGUI: Minor cleanup in GScrollBar.
This commit is contained in:
parent
546946775b
commit
29f2a22d34
2 changed files with 37 additions and 36 deletions
|
@ -98,8 +98,10 @@ Rect DirectoryView::row_rect(int item_index) const
|
|||
|
||||
void DirectoryView::mousedown_event(GMouseEvent& event)
|
||||
{
|
||||
for (int i = 0; i < item_count(); ++i) {
|
||||
if (row_rect(i).contains(event.position())) {
|
||||
if (event.button() == GMouseButton::Left) {
|
||||
for (int i = 0; i < item_count(); ++i) {
|
||||
if (!row_rect(i).contains(event.position()))
|
||||
continue;
|
||||
auto& entry = this->entry(i);
|
||||
if (entry.is_directory()) {
|
||||
FileSystemPath new_path(String::format("%s/%s", m_path.characters(), entry.name.characters()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue