mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-06 17:50:58 +01:00
Merge branch 'fix-hig-issues' into 'master'
Fix hig issues See merge request World/Authenticator!103
This commit is contained in:
commit
6c1232191a
6 changed files with 20 additions and 11 deletions
|
@ -112,10 +112,9 @@ class Application(Gtk.Application):
|
|||
# Main section
|
||||
main_content = Gio.Menu.new()
|
||||
# Night mode action
|
||||
main_content.append_item(Gio.MenuItem.new(_("Settings"), "app.settings"))
|
||||
main_content.append_item(Gio.MenuItem.new(_("About"), "app.about"))
|
||||
main_content.append_item(Gio.MenuItem.new(_("Preferences"), "app.settings"))
|
||||
main_content.append_item(Gio.MenuItem.new(_("About Authenticator"), "app.about"))
|
||||
main_content.append_item(Gio.MenuItem.new(_("Keyboard Shortcuts"), "app.shortcuts"))
|
||||
main_content.append_item(Gio.MenuItem.new(_("Quit"), "app.quit"))
|
||||
help_section = Gio.MenuItem.new_section(None, main_content)
|
||||
self._menu.append_item(help_section)
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ class AccountsWidget(Gtk.Box, GObject.GObject):
|
|||
|
||||
def _build_widgets(self):
|
||||
self.otp_progress_bar = Gtk.ProgressBar()
|
||||
self.otp_progress_bar.get_style_context().add_class("progress-bar")
|
||||
self.add(self.otp_progress_bar)
|
||||
AccountsManager.get_default().connect(
|
||||
"counter_updated", self._on_counter_updated)
|
||||
|
|
|
@ -54,15 +54,16 @@ class ActionsBox(Gtk.Box):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
|
||||
Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL,
|
||||
spacing=6)
|
||||
self.copy_btn = ActionButton("edit-copy-symbolic", _("Copy"))
|
||||
self.edit_btn = ActionButton("document-edit-symbolic", _("Edit"))
|
||||
self._build_widget()
|
||||
|
||||
def _build_widget(self):
|
||||
"""Build ActionsBox widgets."""
|
||||
self.pack_start(self.copy_btn, False, False, 3)
|
||||
self.pack_start(self.edit_btn, False, False, 3)
|
||||
self.pack_start(self.copy_btn, False, False, 0)
|
||||
self.pack_start(self.edit_btn, False, False, 0)
|
||||
|
||||
|
||||
class AccountRow(Gtk.ListBoxRow, GObject.GObject):
|
||||
|
@ -134,7 +135,7 @@ class AccountRow(Gtk.ListBoxRow, GObject.GObject):
|
|||
actions.copy_btn.connect("clicked", self._on_copy)
|
||||
actions.edit_btn.connect("clicked", self._on_edit)
|
||||
actions.set_valign(Gtk.Align.CENTER)
|
||||
container.pack_end(actions, False, False, 6)
|
||||
container.pack_end(actions, False, False, 0)
|
||||
|
||||
# Secret code
|
||||
otp_container = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
|
|
|
@ -126,7 +126,8 @@ class HeaderBar(Gtk.HeaderBar):
|
|||
self.set_show_close_button(True)
|
||||
|
||||
left_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
||||
right_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
|
||||
right_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,
|
||||
spacing=6)
|
||||
|
||||
# Hide the search button if nothing is found
|
||||
if Database.get_default().count > 0:
|
||||
|
@ -139,7 +140,7 @@ class HeaderBar(Gtk.HeaderBar):
|
|||
right_box.pack_start(self.search_btn, False, False, 0)
|
||||
right_box.pack_start(self.select_btn, False, False, 0)
|
||||
right_box.pack_start(self.cancel_btn, False, False, 0)
|
||||
right_box.pack_end(self.settings_btn, False, False, 3)
|
||||
right_box.pack_end(self.settings_btn, False, False, 0)
|
||||
|
||||
self.pack_start(left_box)
|
||||
self.pack_end(right_box)
|
||||
|
|
|
@ -50,8 +50,6 @@ class SearchBar(Gtk.SearchBar):
|
|||
"""
|
||||
Build the SearchBar widgets
|
||||
"""
|
||||
self.set_show_close_button(True)
|
||||
|
||||
self.search_entry.set_width_chars(28)
|
||||
self.search_entry.connect("search-changed",
|
||||
self.set_filter_func,
|
||||
|
|
|
@ -75,3 +75,12 @@
|
|||
font-size: 18px;
|
||||
|
||||
}
|
||||
|
||||
.progress-bar trough progress {
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
|
||||
.progress-bar trough {
|
||||
border-radius: 0px
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue