Skip to content

Commit

Permalink
Present Adw.PreferencesDialog either as floating window or bottom sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
ztefn committed Nov 17, 2024
1 parent 9cc3acc commit a0c0bc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/preferences.vala
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ namespace Haguichi {
unowned Adw.SwitchRow notify_on_member_offline;

construct {
#if ADW_1_6
((Adw.BreakpointBin) general_page.get_ancestor (typeof (Adw.BreakpointBin))).width_request = 320;
#endif
general_page.icon_name = Utils.get_available_theme_icon ({
"applications-system-symbolic",
"emblem-system-symbolic",
Expand Down
8 changes: 0 additions & 8 deletions src/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,7 @@ namespace Haguichi {
application = app
#endif
};
#if ADW_1_6
prefs.present (null);
var win = (Gtk.Window) prefs.get_root ();
win.default_height = 581;
win.resizable = true;
show_dialog (win);
#else
show_dialog (prefs);
#endif
}

private void shortcuts_action () {
Expand Down

0 comments on commit a0c0bc9

Please sign in to comment.