Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add About section in Settings Dialog #330

Merged
merged 4 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ indent_size = 2

[*.{vala,py}]
indent_size = 4
block_comment_start = /**
block_comment = *
block_comment_end = */
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ Contact: [http://tysontan.com](http://tysontan.com) / [[email protected]](mailt
## 📜 License
#### [GNU GPLv3 / Creative Commons BY-SA](./COPYING)

Copyright © 2019 Akira Project.
Copyright © 2019-2020 Akira Project.
95 changes: 95 additions & 0 deletions SUPPORTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# List of Akira Supporters

:tada: All the awesome people that donated to the project :tada:

* LordVarkson
* Coryn
* Kiyoshi Aman
* Pierre Paul Lefebvre
* Jan Masak
* Alexandru Nedel
* Samuel Gyger
* Patrick Nafarrete
* Tyler Compton
* Vagner Rodrigues
* Frederick M. Rogers
* Matko
* veritanuda
* Jof Rey
* Paul Demers
* Bob Patraque
* Wilhelm Fitzpatrick
* Sage Ross
* Joshua Draxten
* Nick Richards
* Simon Hafner
* Alexander Poselentsev
* Aris Papathéodorou
* Wesley Moore
* Noel
* Isak Westerlund
* Sam Muirhead
* Christopher Crouse
* manokara
* Sumner Evans
* Steven Teskey
* nicolas
* Alexander Nesterenko
* Xaviju
* Joshua Heidrich
* snorpey
* Per Thomas Lundal
* Gernot Premper
* Markus Huggler
* Luis Barron
* Wtcher
* maylme
* Marek Pikuła
* Rebecca Bulboaca
* Benjamin Altpeter
* Raí Biason Toffoletto
* Daniel Foré
* Guillaume Chau
* Stephan Müller
* Imanuel
* Andrew Sauber
* Alexey Bolonia
* Andreas Libak Jørgensen
* Arthur Nieuwland
* Pyves & Ran
* Aode (Lion)
* Nacheta Menjibar
* sStevemMartin
* Jebedaia
* Sebi
* Shaleen Jain
* Ezra Sharp
* TheCrealm
* rickard
* Roberto
* Bryan Paget
* Shelby Cruver
* Markus Rubey
* Miura Seiji
* Vladislav Petrov
* Bruno Paz
* Gonçalo
* Ben Oliver
* Tenné
* Antonio Maciej Matamoros Ochman
* Stephan Plöhn
* Gabriel J Perez
* Jonas Rudlang
* Pietro Vertechi
* dehahost
* Marián Brém
* Bacchus
* Selwyn
* User
* Martin Kregar
* oliver
* James Dyson
* Wout
* Thomas Höß
* Brian Hinton
* Ryan Halliday
97 changes: 92 additions & 5 deletions src/Dialogs/SettingsDialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,10 @@ public class Akira.Dialogs.SettingsDialog : Gtk.Dialog {
private Gtk.ColorButton border_color;
private Gtk.SpinButton border_size;

enum Column {
ICONTYPE
}

public SettingsDialog (Akira.Window _window) {
Object (
window: _window,
border_width: 5,
border_width: 6,
deletable: true,
resizable: false,
modal: true,
Expand All @@ -54,6 +50,7 @@ public class Akira.Dialogs.SettingsDialog : Gtk.Dialog {
stack.add_titled (get_general_box (), "general", _("General"));
stack.add_titled (get_interface_box (), "interface", _("Interface"));
stack.add_titled (get_shapes_box (), "shapes", _("Shapes"));
stack.add_titled (get_about_box (), "about", _("About"));

var stack_switcher = new Gtk.StackSwitcher ();
stack_switcher.set_stack (stack);
Expand Down Expand Up @@ -186,6 +183,96 @@ public class Akira.Dialogs.SettingsDialog : Gtk.Dialog {
return grid;
}

private Gtk.Widget get_about_box () {
var grid = new Gtk.Grid ();
grid.row_spacing = 6;
grid.column_spacing = 12;
grid.halign = Gtk.Align.CENTER;

var app_icon = new Gtk.Image ();
app_icon.gicon = new ThemedIcon ("com.github.akiraux.akira");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use Config.APP_ID here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! Icon is not render on flatpak

Captura de pantalla de 2020-04-17 10-11-18

app_icon.pixel_size = 64;
app_icon.margin_top = 12;

var app_name = new Gtk.Label (APP_NAME);
app_name.get_style_context ().add_class ("h2");
app_name.margin_top = 6;

var app_description = new Gtk.Label (_("The Linux Design Tool"));
app_description.get_style_context ().add_class ("h3");

var app_version = new Gtk.Label ("v" + Constants.VERSION + " - alpha");
app_version.get_style_context ().add_class ("dim-label");
app_version.selectable = true;

var disclaimer = new Gtk.Label (
_("WARNING!\nAkira is still under development and not ready for production. Missing features, random bugs, and black holes opening in your kitchen are to be expected."
)
);
disclaimer.justify = Gtk.Justification.CENTER;
disclaimer.max_width_chars = 60;
disclaimer.wrap = true;
disclaimer.margin_top = disclaimer.margin_bottom = 12;

var patreons_label = new Gtk.Label (_("Thanks to our awesome supporters!"));
patreons_label.get_style_context ().add_class ("h4");

var patreons_url = new Gtk.LinkButton.with_label (
"https://github.com/akiraux/Akira/blob/master/SUPPORTERS.md",
_("View the list of supporters")
);
patreons_url.halign = Gtk.Align.CENTER;
patreons_url.margin_bottom = 12;

grid.attach (app_icon, 0, 0);
grid.attach (app_name, 0, 1);
grid.attach (app_description, 0, 2);
grid.attach (app_version, 0, 3);
grid.attach (disclaimer, 0, 4);
grid.attach (patreons_label, 0, 5);
grid.attach (patreons_url, 0, 6);

// Button grid at the bottom of the About page.
var button_grid = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL);
button_grid.halign = Gtk.Align.CENTER;
button_grid.spacing = 6;

var donate_button = new Gtk.Button.with_label (_("Make a Donation"));
donate_button.clicked.connect (() => {
try {
AppInfo.launch_default_for_uri ("https://github.com/akiraux/Akira#-support", null);
} catch (Error e) {
warning (e.message);
}
});

var translate_button = new Gtk.Button.with_label (_("Suggest Translations"));
translate_button.clicked.connect (() => {
try {
AppInfo.launch_default_for_uri ("https://github.com/akiraux/Akira/issues", null);
} catch (Error e) {
warning (e.message);
}
});

var bug_button = new Gtk.Button.with_label (_("Report a Problem"));
bug_button.clicked.connect (() => {
try {
AppInfo.launch_default_for_uri ("https://github.com/akiraux/Akira/issues", null);
} catch (Error e) {
warning (e.message);
}
});

button_grid.add (donate_button);
button_grid.add (translate_button);
button_grid.add (bug_button);

grid.attach (button_grid, 0, 7);

return grid;
}

private class SettingsHeader : Gtk.Label {
public SettingsHeader (string text) {
label = text;
Expand Down
3 changes: 1 addition & 2 deletions src/config.vala.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ namespace Constants {
public const string DATADIR = "@DATADIR@";
public const string PKGDATADIR = "@PKGDATADIR@";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string RELEASE_NAME = "@RELEASE_NAME@";
public const string PROJECT_NAME = "@PROJECT_NAME@";
public const string VERSION = "@VERSION@";
public const string VERSION_INFO = "@VERSION_INFO@";
public const string INSTALL_PREFIX = "@PREFIX@";
public const string APP_ID = "@APP_ID@";
public const string PROFILE = "@PROFILE@";
Expand Down