Skip to content

Commit

Permalink
Improve UI and add default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
zevlee committed May 28, 2022
1 parent e9fada6 commit 62e0ccc
Show file tree
Hide file tree
Showing 25 changed files with 852 additions and 638 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.3.0
8 changes: 2 additions & 6 deletions gui/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
<attribute name="action">app.prefs</attribute>
<attribute name="label" translatable="yes">_Preferences</attribute>
</item>
<item>
<attribute name="action">app.reset</attribute>
<attribute name="label" translatable="yes">_Reset</attribute>
</item>
<item>
<attribute name="action">app.about</attribute>
<attribute name="label" translatable="yes">_About</attribute>
</item>
<item>
<attribute name="action">app.quit</attribute>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.reset</attribute>
<attribute name="label" translatable="yes">_Reset</attribute>
</item>
</section>
</menu>
Expand Down
30 changes: 30 additions & 0 deletions lib/about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3

from lib.utils import Utils
from os.path import join
from gi import require_versions
require_versions({"Gtk": "3.0"})
from gi.repository import Gtk
from gi.repository.GdkPixbuf import Pixbuf


class About(Gtk.AboutDialog):

def __init__(self, parent):
super().__init__(
modal=True,
transient_for=parent,
program_name=Utils.NAME,
version=Utils.VERSION,
copyright="Copyright © 2021-2022 Zev Lee",
license_type=Gtk.License.MIT_X11,
website="https://github.com/zevlee/passphraser",
website_label="Homepage"
)

# Set up logo
filename = join(Utils.APP_DIR, f"{Utils.ID}.svg")
logo = Pixbuf.new_from_file(filename)

# Add logo
self.set_logo(logo)
Loading

0 comments on commit 62e0ccc

Please sign in to comment.