Merge lp:~arayaq/pantheon-terminal/fix-1354954 into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by Angel Araya
Status: Merged
Approved by: David Gomes
Approved revision: 612
Merged at revision: 639
Proposed branch: lp:~arayaq/pantheon-terminal/fix-1354954
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 15 lines (+5/-0)
1 file modified
src/PantheonTerminalWindow.vala (+5/-0)
To merge this branch: bzr merge lp:~arayaq/pantheon-terminal/fix-1354954
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Review via email: mp+231657@code.launchpad.net

Commit message

Set window hints to set the resize increments to the char width and height, fixing bug #1254954.

Description of the change

Set window hints to set the resize increments to the char width and height

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) wrote :

Shouldn't this be done on resize?

Revision history for this message
Angel Araya (arayaq) wrote :

David,
This sets the geometry hints, when the window is resized it adapts to the given hints (Here the size increments). If you modify the size inside the on_resize signal it will create a loop until you reach a desired size. I think this is the built-in way to manage this cases.

Revision history for this message
David Gomes (davidgomes) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/PantheonTerminalWindow.vala'
2--- src/PantheonTerminalWindow.vala 2014-08-09 17:05:43 +0000
3+++ src/PantheonTerminalWindow.vala 2014-08-21 01:58:17 +0000
4@@ -464,6 +464,11 @@
5 app.minimum_width = minimum_width;
6 app.minimum_height = minimum_height;
7
8+ Gdk.Geometry hints = Gdk.Geometry();
9+ hints.width_inc = (int) t.get_char_width ();
10+ hints.height_inc = (int) t.get_char_height ();
11+ set_geometry_hints (this, hints, Gdk.WindowHints.RESIZE_INC);
12+
13 notebook.insert_tab (tab, -1);
14 notebook.current = tab;
15 t.grab_focus ();

Subscribers

People subscribed via source and target branches