From e5f15461d115e0a9c2b2964b003443a7472bd1dd Mon Sep 17 00:00:00 2001 From: Alain Date: Thu, 16 May 2024 19:29:52 -0500 Subject: [PATCH] improve css styles and quick find --- core/Layouts/HeaderItem.vala | 2 +- .../DateTimePicker/ScheduleButton.vala | 4 +- core/Widgets/ItemLabelChild.vala | 2 +- core/Widgets/LabelPicker/LabelButton.vala | 4 +- core/Widgets/LabelsPickerCore.vala | 2 +- core/Widgets/PriorityButton.vala | 4 +- .../ReminderPicker/ReminderButton.vala | 4 +- core/Widgets/SectionPicker/SectionButton.vala | 4 +- core/Widgets/StatusButton.vala | 4 +- data/resources/stylesheet/typography.css | 4 - src/Dialogs/Preferences/Pages/Sidebar.vala | 2 +- .../Preferences/PreferencesWindow.vala | 6 +- src/Dialogs/QuickFind/QuickFind.vala | 108 +++++++++--------- src/Dialogs/QuickFind/QuickFindItem.vala | 4 +- src/Dialogs/RepeatConfig.vala | 22 ++-- src/Dialogs/WhatsNew.vala | 2 +- src/Layouts/HeaderBar.vala | 5 +- src/Layouts/ItemBoard.vala | 8 +- src/Layouts/ItemRow.vala | 8 +- src/Layouts/ItemSidebarView.vala | 2 +- src/Layouts/ProjectRow.vala | 4 +- src/Layouts/SectionRow.vala | 2 +- src/MainWindow.vala | 4 +- src/Services/ActionManager.vala | 2 +- src/Views/Project/Board.vala | 2 +- src/Views/Project/List.vala | 2 +- src/Views/Project/Project.vala | 4 +- src/Widgets/EventRow.vala | 4 +- src/Widgets/FilterFlowBox.vala | 4 +- src/Widgets/LabelChild.vala | 2 +- src/Widgets/LabelsSummary.vala | 2 +- 31 files changed, 118 insertions(+), 115 deletions(-) diff --git a/core/Layouts/HeaderItem.vala b/core/Layouts/HeaderItem.vala index 30cf9d2f7..c2ed51e26 100644 --- a/core/Layouts/HeaderItem.vala +++ b/core/Layouts/HeaderItem.vala @@ -215,7 +215,7 @@ public class Layouts.HeaderItem : Adw.Bin { }; placeholder_label.add_css_class ("dim-label"); - placeholder_label.add_css_class ("small-label"); + placeholder_label.add_css_class ("caption"); var content_box = new Adw.Bin () { margin_top = 12, diff --git a/core/Widgets/DateTimePicker/ScheduleButton.vala b/core/Widgets/DateTimePicker/ScheduleButton.vala index c6d8cd89f..623e0e269 100644 --- a/core/Widgets/DateTimePicker/ScheduleButton.vala +++ b/core/Widgets/DateTimePicker/ScheduleButton.vala @@ -141,7 +141,7 @@ public class Widgets.ScheduleButton : Gtk.Grid { var title_label = new Gtk.Label (_("Schedule")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; due_label = new Gtk.Label (_("Set a Due Date")) { @@ -149,7 +149,7 @@ public class Widgets.ScheduleButton : Gtk.Grid { use_markup = true, halign = START, ellipsize = Pango.EllipsizeMode.END, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/core/Widgets/ItemLabelChild.vala b/core/Widgets/ItemLabelChild.vala index c0cbbddd8..5d4814ccb 100644 --- a/core/Widgets/ItemLabelChild.vala +++ b/core/Widgets/ItemLabelChild.vala @@ -37,7 +37,7 @@ public class Widgets.ItemLabelChild : Gtk.FlowBoxChild { name_label = new Gtk.Label (null); name_label.valign = Gtk.Align.CENTER; - name_label.add_css_class ("small-label"); + name_label.add_css_class ("caption"); var labelrow_grid = new Adw.Bin () { child = name_label diff --git a/core/Widgets/LabelPicker/LabelButton.vala b/core/Widgets/LabelPicker/LabelButton.vala index 958da79a1..4cc09efc0 100644 --- a/core/Widgets/LabelPicker/LabelButton.vala +++ b/core/Widgets/LabelPicker/LabelButton.vala @@ -68,7 +68,7 @@ public class Widgets.LabelPicker.LabelButton : Adw.Bin { if (is_board) { var title_label = new Gtk.Label (_("Labels")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; labels_label = new Gtk.Label (_("Select Labels")) { @@ -76,7 +76,7 @@ public class Widgets.LabelPicker.LabelButton : Adw.Bin { use_markup = true, halign = START, ellipsize = Pango.EllipsizeMode.END, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/core/Widgets/LabelsPickerCore.vala b/core/Widgets/LabelsPickerCore.vala index 899af657b..7043ea30a 100644 --- a/core/Widgets/LabelsPickerCore.vala +++ b/core/Widgets/LabelsPickerCore.vala @@ -232,7 +232,7 @@ public class Widgets.LabelsPickerCore : Adw.Bin { placeholder_message_label = new Gtk.Label (PLACEHOLDER_MESSAGE) { wrap = true, justify = Gtk.Justification.CENTER, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; var spinner = new Gtk.Spinner () { diff --git a/core/Widgets/PriorityButton.vala b/core/Widgets/PriorityButton.vala index 05af9ec3e..7953c6451 100644 --- a/core/Widgets/PriorityButton.vala +++ b/core/Widgets/PriorityButton.vala @@ -72,14 +72,14 @@ public class Widgets.PriorityButton : Adw.Bin { var title_label = new Gtk.Label (_("Priority")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; priority_label = new Gtk.Label (_("Priority 4: None")) { xalign = 0, use_markup = true, halign = START, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/core/Widgets/ReminderPicker/ReminderButton.vala b/core/Widgets/ReminderPicker/ReminderButton.vala index 236d1e26b..d6169c459 100644 --- a/core/Widgets/ReminderPicker/ReminderButton.vala +++ b/core/Widgets/ReminderPicker/ReminderButton.vala @@ -53,7 +53,7 @@ public class Widgets.ReminderPicker.ReminderButton : Adw.Bin { if (is_board) { var title_label = new Gtk.Label (_("Reminders")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; value_label = new Gtk.Label (_("Add Reminders")) { @@ -61,7 +61,7 @@ public class Widgets.ReminderPicker.ReminderButton : Adw.Bin { use_markup = true, halign = START, ellipsize = Pango.EllipsizeMode.END, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/core/Widgets/SectionPicker/SectionButton.vala b/core/Widgets/SectionPicker/SectionButton.vala index 0f4b0f3d7..77602e578 100644 --- a/core/Widgets/SectionPicker/SectionButton.vala +++ b/core/Widgets/SectionPicker/SectionButton.vala @@ -34,7 +34,7 @@ public class Widgets.SectionPicker.SectionButton : Adw.Bin { construct { var title_label = new Gtk.Label (_("Section")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; section_label = new Gtk.Label (_("Select Section")) { @@ -42,7 +42,7 @@ public class Widgets.SectionPicker.SectionButton : Adw.Bin { use_markup = true, halign = START, ellipsize = Pango.EllipsizeMode.END, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/core/Widgets/StatusButton.vala b/core/Widgets/StatusButton.vala index d105e0fd0..5e1e82df2 100644 --- a/core/Widgets/StatusButton.vala +++ b/core/Widgets/StatusButton.vala @@ -39,14 +39,14 @@ public class Widgets.StatusButton : Adw.Bin { var title_label = new Gtk.Label (_("Status")) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; value_label = new Gtk.Label (_("To Do")) { xalign = 0, use_markup = true, halign = START, - css_classes = { "small-label" } + css_classes = { "caption" } }; var card_grid = new Gtk.Grid () { diff --git a/data/resources/stylesheet/typography.css b/data/resources/stylesheet/typography.css index d8b73b580..05501aebf 100644 --- a/data/resources/stylesheet/typography.css +++ b/data/resources/stylesheet/typography.css @@ -1,7 +1,3 @@ -.small-label { - font-size: 0.85em; -} - .dim-label, :visited { opacity: 0.75; diff --git a/src/Dialogs/Preferences/Pages/Sidebar.vala b/src/Dialogs/Preferences/Pages/Sidebar.vala index 97a47a0cf..f5da70ba5 100644 --- a/src/Dialogs/Preferences/Pages/Sidebar.vala +++ b/src/Dialogs/Preferences/Pages/Sidebar.vala @@ -69,7 +69,7 @@ public class Dialogs.Preferences.Pages.Sidebar : Adw.Bin { content_box.append (count_group); content_box.append (views_group); content_box.append (new Gtk.Label (_("You can sort your views by dragging and dropping")) { - css_classes = { "small-label", "dim-label" }, + css_classes = { "caption", "dim-label" }, halign = START, margin_start = 12, margin_top = 3 diff --git a/src/Dialogs/Preferences/PreferencesWindow.vala b/src/Dialogs/Preferences/PreferencesWindow.vala index 35cdd7d9d..8a7000fc5 100644 --- a/src/Dialogs/Preferences/PreferencesWindow.vala +++ b/src/Dialogs/Preferences/PreferencesWindow.vala @@ -65,7 +65,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesDialog { xalign = 0, yalign = 0, wrap = true, - css_classes = { "small-label", "banner-text" } + css_classes = { "caption", "banner-text" } }; var banner_button = new Gtk.Button.with_label (_("Supporting Us")) { @@ -1162,7 +1162,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesDialog { var command_entry = new Adw.ActionRow (); command_entry.add_suffix (copy_button); command_entry.title = quick_add_command; - command_entry.add_css_class ("small-label"); + command_entry.add_css_class ("caption"); command_entry.add_css_class ("monospace"); var command_group = new Adw.PreferencesGroup () { @@ -1870,7 +1870,7 @@ private class ValidationMessage : Gtk.Box { wrap = true, xalign = 1 }; - label_widget.add_css_class ("small-label"); + label_widget.add_css_class ("caption"); var revealer = new Gtk.Revealer () { child = label_widget, diff --git a/src/Dialogs/QuickFind/QuickFind.vala b/src/Dialogs/QuickFind/QuickFind.vala index 386cc86b2..c4e949bf3 100644 --- a/src/Dialogs/QuickFind/QuickFind.vala +++ b/src/Dialogs/QuickFind/QuickFind.vala @@ -19,18 +19,16 @@ * Authored by: Alain M. */ -public class Dialogs.QuickFind.QuickFind : Adw.Window { +public class Dialogs.QuickFind.QuickFind : Adw.Dialog { private Gtk.SearchEntry search_entry; private Gtk.ListBox listbox; private Gee.ArrayList items; + public QuickFind () { Object ( - transient_for: Planify.instance.main_window, - deletable: false, - modal: true, - margin_bottom: 164, - width_request: 350, - height_request: 325 + content_width: 350, + content_height: 325, + presentation_mode: Adw.DialogPresentationMode.FLOATING ); } @@ -50,15 +48,19 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { var headerbar_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { hexpand = true, margin_top = 6, - margin_bottom = 6 + margin_bottom = 6, + margin_start = 6 }; headerbar_box.append (search_entry); headerbar_box.append (cancel_button); - var headerbar = new Adw.HeaderBar (); - headerbar.add_css_class ("flat"); - headerbar.title_widget = headerbar_box; + var headerbar = new Adw.HeaderBar () { + title_widget = headerbar_box, + show_start_title_buttons = false, + show_end_title_buttons = false, + css_classes = { "flat" } + }; listbox = new Gtk.ListBox () { hexpand = true, @@ -69,57 +71,28 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { listbox.set_placeholder (get_placeholder ()); listbox.set_header_func (header_function); - var listbox_content = new Adw.Bin () { - margin_bottom = 6, - child = listbox - }; - var listbox_scrolled = new Gtk.ScrolledWindow () { hexpand = true, vexpand = true, hscrollbar_policy = Gtk.PolicyType.NEVER, - child = listbox_content + child = listbox }; var toolbar_view = new Adw.ToolbarView (); toolbar_view.add_top_bar (headerbar); toolbar_view.content = listbox_scrolled; - content = toolbar_view; - - Timeout.add (250, () => { - search_entry.grab_focus (); - return GLib.Source.REMOVE; - }); + child = toolbar_view; + default_widget = search_entry; + Services.EventBus.get_default ().disconnect_typing_accel (); search_entry.search_changed.connect (() => { search_changed (); }); - var controller_key = new Gtk.EventControllerKey (); - content.add_controller (controller_key); - - controller_key.key_pressed.connect ((keyval, keycode, state) => { - var key = Gdk.keyval_name (keyval).replace ("KP_", ""); - - if (key == "Up" || key == "Down") { - return false; - } else if (key == "Enter" || key == "Return" || key == "KP_Enter") { - row_activated (listbox.get_selected_row ()); - return false; - } else { - if (!search_entry.has_focus) { - search_entry.grab_focus (); - if (search_entry.cursor_position < search_entry.text.length) { - search_entry.set_position (search_entry.text.length); - } - } - - return false; - } - - return true; - }); + var listbox_controller_key = new Gtk.EventControllerKey (); + listbox.add_controller (listbox_controller_key); + listbox_controller_key.key_pressed.connect (key_pressed); listbox.row_activated.connect ((row) => { row_activated (row); @@ -148,6 +121,36 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { cancel_button.clicked.connect (() => { hide_destroy (); }); + + var destroy_controller = new Gtk.EventControllerKey (); + add_controller (destroy_controller); + destroy_controller.key_released.connect ((keyval, keycode, state) => { + if (keyval == 65307) { + hide_destroy (); + } + }); + + closed.connect (() => { + Services.EventBus.get_default ().connect_typing_accel (); + }); + } + + private bool key_pressed (uint keyval, uint keycode, Gdk.ModifierType state) { + var key = Gdk.keyval_name (keyval).replace ("KP_", ""); + + if (key == "Up" || key == "Down") { + } else if (key == "Enter" || key == "Return" || key == "KP_Enter") { + row_activated (listbox.get_selected_row ()); + } else { + if (!search_entry.has_focus) { + search_entry.grab_focus (); + if (search_entry.cursor_position < search_entry.text.length) { + search_entry.set_position (search_entry.text.length); + } + } + } + + return false; } private void search_changed () { @@ -262,12 +265,7 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { } private void hide_destroy () { - hide (); - - Timeout.add (500, () => { - destroy (); - return GLib.Source.REMOVE; - }); + close (); } private void clean_results () { @@ -288,7 +286,9 @@ public class Dialogs.QuickFind.QuickFind : Adw.Window { } } - var header_label = new Granite.HeaderLabel (row.base_object.object_type.get_header ()) { + var header_label = new Gtk.Label (row.base_object.object_type.get_header ()) { + css_classes = { "heading", "h4" }, + halign = Gtk.Align.START, margin_start = 12, margin_bottom = 6, margin_top = 6 diff --git a/src/Dialogs/QuickFind/QuickFindItem.vala b/src/Dialogs/QuickFind/QuickFindItem.vala index 324f1b75d..10db030e8 100644 --- a/src/Dialogs/QuickFind/QuickFindItem.vala +++ b/src/Dialogs/QuickFind/QuickFindItem.vala @@ -73,7 +73,7 @@ public class Dialogs.QuickFind.QuickFindItem : Gtk.ListBoxRow { var project_label = new Gtk.Label (section.project.name) { ellipsize = Pango.EllipsizeMode.END, xalign = 0, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; main_grid.attach (section_icon, 0, 0, 1, 2); @@ -98,7 +98,7 @@ public class Dialogs.QuickFind.QuickFindItem : Gtk.ListBoxRow { var project_label = new Gtk.Label (item.project.name) { ellipsize = Pango.EllipsizeMode.END, xalign = 0, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; main_grid.attach (checked_button, 0, 0, 1, 2); diff --git a/src/Dialogs/RepeatConfig.vala b/src/Dialogs/RepeatConfig.vala index 8de2f10e6..bee598a62 100644 --- a/src/Dialogs/RepeatConfig.vala +++ b/src/Dialogs/RepeatConfig.vala @@ -238,23 +238,29 @@ public class Dialogs.RepeatConfig : Adw.Dialog { }; content_box.append (headerbar); - content_box.append (new Granite.HeaderLabel (_("Summary")) { + content_box.append (new Gtk.Label (_("Summary")) { + css_classes = { "heading", "h4" }, margin_top = 6, margin_start = 12, - margin_bottom = 6 + margin_bottom = 6, + halign = Gtk.Align.START }); content_box.append (repeat_preview_box); - content_box.append (new Granite.HeaderLabel (_("Repeat every")) { - margin_top = 6, + content_box.append (new Gtk.Label (_("Repeat every")) { + css_classes = { "heading", "h4" }, + margin_top = 12, margin_start = 12, - margin_bottom = 6 + margin_bottom = 6, + halign = Gtk.Align.START }); content_box.append (repeat_box); content_box.append (weeks_revealer); - content_box.append (new Granite.HeaderLabel (_("End")) { - margin_top = 6, + content_box.append (new Gtk.Label (_("End")) { + css_classes = { "heading", "h4" }, + margin_top = 12, margin_start = 12, - margin_bottom = 6 + margin_bottom = 6, + halign = Gtk.Align.START }); content_box.append (ends_grid); content_box.append (ends_stack); diff --git a/src/Dialogs/WhatsNew.vala b/src/Dialogs/WhatsNew.vala index 6224e4e10..f94aeba75 100644 --- a/src/Dialogs/WhatsNew.vala +++ b/src/Dialogs/WhatsNew.vala @@ -66,7 +66,7 @@ public class Dialogs.WhatsNew : Adw.Dialog { top_margin = 12, bottom_margin = 12, editable = false, - css_classes = { "card", "small-label" } + css_classes = { "card", "caption" } }; textview.remove_css_class ("view"); group.add (textview); diff --git a/src/Layouts/HeaderBar.vala b/src/Layouts/HeaderBar.vala index 9dd6f2f3c..9973be84f 100644 --- a/src/Layouts/HeaderBar.vala +++ b/src/Layouts/HeaderBar.vala @@ -77,9 +77,10 @@ public class Layouts.HeaderBar : Adw.Bin { // Title title_label = new Gtk.Label (null) { use_markup = true, - css_classes = { "font-bold" } + css_classes = { "font-bold" }, + ellipsize = Pango.EllipsizeMode.END }; - + start_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 3); start_box.append (sidebar_button); start_box.append (back_button_revealer); diff --git a/src/Layouts/ItemBoard.vala b/src/Layouts/ItemBoard.vala index 5c82df83f..32c5582eb 100644 --- a/src/Layouts/ItemBoard.vala +++ b/src/Layouts/ItemBoard.vala @@ -162,7 +162,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase { ellipsize = Pango.EllipsizeMode.END, margin_start = 30, margin_end = 6, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; description_revealer = new Gtk.Revealer () { @@ -173,7 +173,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase { // Due Label due_label = new Gtk.Label (null) { valign = Gtk.Align.CENTER, - css_classes = { "small-label" } + css_classes = { "caption" } }; var repeat_image = new Gtk.Image.from_icon_name ("playlist-repeat-symbolic") { @@ -183,7 +183,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase { repeat_label = new Gtk.Label (null) { valign = Gtk.Align.CENTER, - css_classes = { "small-label" }, + css_classes = { "caption" }, ellipsize = Pango.EllipsizeMode.END }; @@ -244,7 +244,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase { }; subtaks_label = new Gtk.Label (null) { - css_classes = { "small-label" } + css_classes = { "caption" } }; var subtaks_container = new Adw.Bin () { diff --git a/src/Layouts/ItemRow.vala b/src/Layouts/ItemRow.vala index 2ee955399..fd5b22620 100644 --- a/src/Layouts/ItemRow.vala +++ b/src/Layouts/ItemRow.vala @@ -277,7 +277,7 @@ public class Layouts.ItemRow : Layouts.ItemBase { }; project_label = new Gtk.Label (null) { - css_classes = { "small-label", "dim-label" }, + css_classes = { "caption", "dim-label" }, margin_start = 6, ellipsize = Pango.EllipsizeMode.END }; @@ -299,7 +299,7 @@ public class Layouts.ItemRow : Layouts.ItemBase { // Due Label due_label = new Gtk.Label (null) { valign = Gtk.Align.CENTER, - css_classes = { "small-label" } + css_classes = { "caption" } }; var repeat_image = new Gtk.Image.from_icon_name ("playlist-repeat-symbolic") { @@ -309,7 +309,7 @@ public class Layouts.ItemRow : Layouts.ItemBase { repeat_label = new Gtk.Label (null) { valign = Gtk.Align.CENTER, - css_classes = { "small-label" }, + css_classes = { "caption" }, ellipsize = Pango.EllipsizeMode.END }; @@ -1157,7 +1157,7 @@ public class Layouts.ItemRow : Layouts.ItemBase { delete_item.add_css_class ("menu-item-danger"); var more_information_item = new Widgets.ContextMenu.MenuItem ("", null); - more_information_item.add_css_class ("small-label"); + more_information_item.add_css_class ("caption"); var popover = new Gtk.Popover () { has_arrow = false, diff --git a/src/Layouts/ItemSidebarView.vala b/src/Layouts/ItemSidebarView.vala index 859b12fcf..377078837 100644 --- a/src/Layouts/ItemSidebarView.vala +++ b/src/Layouts/ItemSidebarView.vala @@ -458,7 +458,7 @@ public class Layouts.ItemSidebarView : Adw.Bin { delete_item.add_css_class ("menu-item-danger"); var more_information_item = new Widgets.ContextMenu.MenuItem ("", null); - more_information_item.add_css_class ("small-label"); + more_information_item.add_css_class ("caption"); var popover = new Gtk.Popover () { has_arrow = false, diff --git a/src/Layouts/ProjectRow.vala b/src/Layouts/ProjectRow.vala index fe543cb96..c2d279fc8 100644 --- a/src/Layouts/ProjectRow.vala +++ b/src/Layouts/ProjectRow.vala @@ -118,7 +118,7 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { hexpand = true, margin_end = 6, halign = Gtk.Align.CENTER, - css_classes = { "small-label", "dim-label" } + css_classes = { "caption", "dim-label" } }; count_revealer = new Gtk.Revealer () { @@ -150,7 +150,7 @@ public class Layouts.ProjectRow : Gtk.ListBoxRow { use_markup = true, valign = Gtk.Align.CENTER, halign = Gtk.Align.CENTER, - css_classes = { "pane-due-button", "small-label" } + css_classes = { "pane-due-button", "caption" } }; menu_stack.add_named (due_label, "due_label"); diff --git a/src/Layouts/SectionRow.vala b/src/Layouts/SectionRow.vala index 775a3a1c0..8f87e0fd9 100644 --- a/src/Layouts/SectionRow.vala +++ b/src/Layouts/SectionRow.vala @@ -109,7 +109,7 @@ public class Layouts.SectionRow : Gtk.ListBoxRow { }; count_label.add_css_class ("dim-label"); - count_label.add_css_class ("small-label"); + count_label.add_css_class ("caption"); count_revealer = new Gtk.Revealer () { reveal_child = int.parse (count_label.label) > 0, diff --git a/src/MainWindow.vala b/src/MainWindow.vala index cc30fa4d7..a9159daba 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -71,7 +71,7 @@ public class MainWindow : Adw.ApplicationWindow { css_classes = { "flat" }, popover = settings_popover, tooltip_text = _("Main Menu"), - child = new Gtk.Image.from_icon_name ("open-menu-symbolic") + icon_name = "open-menu-symbolic" }; var search_button = new Gtk.Button.from_icon_name ("edit-find-symbolic") { @@ -226,7 +226,7 @@ public class MainWindow : Adw.ApplicationWindow { }); search_button.clicked.connect (() => { - (new Dialogs.QuickFind.QuickFind ()).show (); + (new Dialogs.QuickFind.QuickFind ()).present (Planify._instance.main_window); }); var event_controller_key = new Gtk.EventControllerKey (); diff --git a/src/Services/ActionManager.vala b/src/Services/ActionManager.vala index 328d34e9f..e111ab7b1 100644 --- a/src/Services/ActionManager.vala +++ b/src/Services/ActionManager.vala @@ -141,7 +141,7 @@ public class Services.ActionManager : Object { private void action_open_search () { var dialog = new Dialogs.QuickFind.QuickFind (); - dialog.show (); + dialog.present (Planify._instance.main_window); } private void action_sync_manually () { diff --git a/src/Views/Project/Board.vala b/src/Views/Project/Board.vala index f743ad535..c8f2320ce 100644 --- a/src/Views/Project/Board.vala +++ b/src/Views/Project/Board.vala @@ -246,7 +246,7 @@ public class Views.Board : Adw.Bin { days_left_label = new Gtk.Label (null) { xalign = 0, // yalign = 0.7, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; days_left_label.yalign = float.parse ("0.7"); diff --git a/src/Views/Project/List.vala b/src/Views/Project/List.vala index cc3568387..eca35c572 100644 --- a/src/Views/Project/List.vala +++ b/src/Views/Project/List.vala @@ -316,7 +316,7 @@ public class Views.List : Gtk.Grid { days_left_label = new Gtk.Label (null) { xalign = 0, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; days_left_label.yalign = float.parse ("0.7"); diff --git a/src/Views/Project/Project.vala b/src/Views/Project/Project.vala index 48014b19c..22d2ad254 100644 --- a/src/Views/Project/Project.vala +++ b/src/Views/Project/Project.vala @@ -365,7 +365,7 @@ public class Views.Project : Adw.Bin { list_box.append (new Gtk.Image.from_icon_name ("list-symbolic")); list_box.append (new Gtk.Label (_("List")) { - css_classes = { "small-label" }, + css_classes = { "caption" }, valign = CENTER }); @@ -380,7 +380,7 @@ public class Views.Project : Adw.Bin { board_box.append (new Gtk.Image.from_icon_name ("view-columns-symbolic")); board_box.append (new Gtk.Label (_("Board")) { - css_classes = { "small-label" }, + css_classes = { "caption" }, valign = CENTER }); diff --git a/src/Widgets/EventRow.vala b/src/Widgets/EventRow.vala index fce301170..81f3fe4e1 100644 --- a/src/Widgets/EventRow.vala +++ b/src/Widgets/EventRow.vala @@ -76,7 +76,7 @@ public class Widgets.EventRow : Gtk.ListBoxRow { xalign = 0, valign = Gtk.Align.CENTER, width_chars = 7, - css_classes = { "dim-label", "small-label" } + css_classes = { "dim-label", "caption" } }; var name_label = new Gtk.Label (component.get_summary ()) { @@ -86,7 +86,7 @@ public class Widgets.EventRow : Gtk.ListBoxRow { use_markup = true, wrap_mode = Pango.WrapMode.WORD_CHAR, margin_start = 3, - css_classes = { "small-label" } + css_classes = { "caption" } }; var grid = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { diff --git a/src/Widgets/FilterFlowBox.vala b/src/Widgets/FilterFlowBox.vala index b1f93c3fc..d01d5f0ce 100644 --- a/src/Widgets/FilterFlowBox.vala +++ b/src/Widgets/FilterFlowBox.vala @@ -123,14 +123,14 @@ public class Widgets.FilterFlowBoxChild : Gtk.FlowBoxChild { title_label = new Gtk.Label (null) { halign = START, - css_classes = { "title-4", "small-label" } + css_classes = { "title-4", "caption" } }; value_label = new Gtk.Label (null) { xalign = 0, use_markup = true, halign = START, - css_classes = { "small-label" } + css_classes = { "caption" } }; var close_button = new Gtk.Button.from_icon_name ("cross-large-circle-filled-symbolic") { diff --git a/src/Widgets/LabelChild.vala b/src/Widgets/LabelChild.vala index 77e053822..0bf6f0a9c 100644 --- a/src/Widgets/LabelChild.vala +++ b/src/Widgets/LabelChild.vala @@ -49,7 +49,7 @@ public class Widgets.LabelChild : Gtk.FlowBoxChild { name_label = new Gtk.Label (null); name_label.valign = Gtk.Align.CENTER; - name_label.add_css_class ("small-label"); + name_label.add_css_class ("caption"); var labelrow_grid = new Gtk.Grid () { column_spacing = 6 diff --git a/src/Widgets/LabelsSummary.vala b/src/Widgets/LabelsSummary.vala index 36845dfc6..6ad763f25 100644 --- a/src/Widgets/LabelsSummary.vala +++ b/src/Widgets/LabelsSummary.vala @@ -64,7 +64,7 @@ public class Widgets.LabelsSummary : Adw.Bin { }; more_label = new Gtk.Label (null) { - css_classes = { "small-label" } + css_classes = { "caption" } }; more_label_grid = new Adw.Bin () {