Merge lp:~artem-anufrij/scratch/Bugfix-1395412 into lp:~elementary-apps/scratch/scratch

Proposed by Artem Anufrij
Status: Merged
Approved by: Danielle Foré
Approved revision: 1416
Merged at revision: 1416
Proposed branch: lp:~artem-anufrij/scratch/Bugfix-1395412
Merge into: lp:~elementary-apps/scratch/scratch
Diff against target: 38 lines (+5/-2)
1 file modified
src/MainWindow.vala (+5/-2)
To merge this branch: bzr merge lp:~artem-anufrij/scratch/Bugfix-1395412
Reviewer Review Type Date Requested Status
Gero.Bare (community) Approve
elementary Apps team Pending
Review via email: mp+242588@code.launchpad.net

Commit message

hide zoom button if welcome screen is visible.

Description of the change

hide zoom button if welcome screen is visible.

To post a comment you must log in.
Revision history for this message
Gero.Bare (gero-bare) wrote :

Nice work.
This performs as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/MainWindow.vala'
2--- src/MainWindow.vala 2014-11-10 18:09:21 +0000
3+++ src/MainWindow.vala 2014-11-23 10:55:52 +0000
4@@ -203,7 +203,6 @@
5 // Set actions sensitive property
6 main_actions.get_action ("SaveFile").visible = (!settings.autosave || doc.file == null);
7 main_actions.get_action ("SaveFileAs").visible = (doc.file != null);
8- main_actions.get_action ("Zoom").visible = get_current_font_size () != get_default_font_size ();
9 doc.check_undoable_actions ();
10 });
11
12@@ -317,6 +316,9 @@
13 main_actions.get_action ("Revert").sensitive = val;
14 this.toolbar.share_app_menu.sensitive = val;
15
16+ // Zoom button
17+ main_actions.get_action ("Zoom").visible = get_current_font_size () != get_default_font_size () && val;
18+
19 // PlugIns
20 if (val) {
21 on_plugin_toggled (this.contextbar);
22@@ -559,7 +561,6 @@
23 font_size = (int) get_default_font_size ();
24 }
25
26-
27 if (direction == ScrollDirection.DOWN) {
28 font_size --;
29 if (font_size < FONT_SIZE_MIN)
30@@ -572,6 +573,8 @@
31
32 string new_font = font + " " + font_size.to_string ();
33 Scratch.settings.font = new_font;
34+
35+ main_actions.get_action ("Zoom").visible = get_current_font_size () != get_default_font_size () && !split_view.is_empty ();
36 }
37
38 public string get_current_font () {

Subscribers

People subscribed via source and target branches