Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions data/gresource.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<gresources>
<gresource prefix="io/elementary/calculator/icons">
<file alias="scalable/actions/view-sidebar-end-symbolic.svg" compressed="true" preprocess="xml-stripblanks">view-sidebar-end-symbolic.svg</file>
</gresource>
</gresources>
16 changes: 16 additions & 0 deletions data/icons/view-sidebar-end-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ i18n.merge_file(
install: true,
install_dir: get_option('datadir') / 'metainfo',
)

gresource = gnome.compile_resources(
'gresource',
'gresource.xml',
source_dir: 'icons'
)
4 changes: 1 addition & 3 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class PantheonCalculator.MainWindow : Gtk.ApplicationWindow {
history = new List<History?> ();
position = 0;
button_extended = new Gtk.ToggleButton () {
icon_name = "pane-hide-symbolic",
icon_name = "view-sidebar-end-symbolic",
tooltip_text = _("Show extended functionality")
};
button_extended.toggled.connect (toggle_grid);
Expand Down Expand Up @@ -773,12 +773,10 @@ public class PantheonCalculator.MainWindow : Gtk.ApplicationWindow {
position = entry.get_position ();
if (button.get_active ()) {
/* Show extended functionality */
button.icon_name = "pane-show-symbolic";
button.tooltip_text = _("Hide extended functionality");
extended_revealer.reveal_child = true;
} else {
/* Hide extended functionality */
button.icon_name = "pane-hide-symbolic";
button.tooltip_text = _("Show extended functionality");
extended_revealer.reveal_child = false;
}
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
executable(
meson.project_name(),
gresource,
config_file,
'Application.vala',
'Button.vala',
Expand Down