mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
LibGUI: FilePicker: Make icon view button initially checked
This commit is contained in:
parent
ef433cb367
commit
1b140d1b5b
Notes:
sideshowbarker
2024-07-19 07:03:08 +09:00
Author: https://github.com/BenWiederhake
Commit: 1b140d1b5b
Pull-request: https://github.com/SerenityOS/serenity/pull/2036
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/zlotny
2 changed files with 6 additions and 2 deletions
|
@ -106,9 +106,9 @@ MultiView::MultiView()
|
|||
on_drop(index, event);
|
||||
};
|
||||
#endif
|
||||
set_view_mode(ViewMode::Icon);
|
||||
|
||||
build_actions();
|
||||
set_view_mode(ViewMode::Icon);
|
||||
}
|
||||
|
||||
MultiView::~MultiView()
|
||||
|
@ -123,16 +123,19 @@ void MultiView::set_view_mode(ViewMode mode)
|
|||
update();
|
||||
if (mode == ViewMode::Table) {
|
||||
set_active_widget(m_table_view);
|
||||
m_view_as_table_action->set_checked(true);
|
||||
return;
|
||||
}
|
||||
#ifdef MULTIVIEW_WITH_COLUMNSVIEW
|
||||
if (mode == ViewMode::Columns) {
|
||||
set_active_widget(m_columns_view);
|
||||
m_view_as_columns_action->set_checked(true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (mode == ViewMode::Icon) {
|
||||
set_active_widget(m_icon_view);
|
||||
m_view_as_icons_action->set_checked(true);
|
||||
return;
|
||||
}
|
||||
ASSERT_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue