[meld/meld-3-20] ui.vcdialogs: Fix incorrect height-request override (#351)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-3-20] ui.vcdialogs: Fix incorrect height-request override (#351)
- Date: Fri, 1 Nov 2019 19:58:15 +0000 (UTC)
commit ea604783949a7cab81b5e64cec2483bc96e98c60
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Aug 31 11:37:37 2019 +1000
ui.vcdialogs: Fix incorrect height-request override (#351)
We set a height request for the scrolledwindow here to get a sensible
height allocation for the commit message field, but then override it
when setting the font-dependent width allocation.
meld/ui/vcdialogs.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/ui/vcdialogs.py b/meld/ui/vcdialogs.py
index 74e4edc3..c83ed0e7 100644
--- a/meld/ui/vcdialogs.py
+++ b/meld/ui/vcdialogs.py
@@ -62,10 +62,10 @@ class CommitDialog(GObject.GObject, Component):
# Try and make the textview wide enough for a standard 80-character
# commit message.
context = self.textview.get_pango_context()
- metrics = context.get_metrics(meldsettings.font,
- context.get_language())
+ metrics = context.get_metrics(None, None)
char_width = metrics.get_approximate_char_width() / Pango.SCALE
- self.scrolledwindow1.set_size_request(80 * char_width, -1)
+ width_request, height_request = self.scrolledwindow1.get_size_request()
+ self.scrolledwindow1.set_size_request(80 * char_width, height_request)
settings.bind('vc-show-commit-margin', self.textview,
'show-right-margin', Gio.SettingsBindFlags.DEFAULT)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]