Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
8031e049
by wurstsalat at 2021-02-16T23:58:00+01:00
3 changed files:
Changes:
| ... | ... | @@ -178,6 +178,16 @@ def __init__(self, parent_win, widget_name, contact, acct, |
| 178 | 178 |
self.conv_textview.tv.connect('key-press-event',
|
| 179 | 179 |
self._on_conv_textview_key_press_event)
|
| 180 | 180 |
|
| 181 |
+ # This is a workaround: as soon as a line break occurs in Gtk.TextView
|
|
| 182 |
+ # with word-char wrapping enabled, a hyphen character is automatically
|
|
| 183 |
+ # inserted before the line break. This triggers the hscrollbar to show,
|
|
| 184 |
+ # see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2384
|
|
| 185 |
+ # Using set_hscroll_policy(Gtk.Scrollable.Policy.NEVER) would cause bad
|
|
| 186 |
+ # performance during resize, and prevent the window from being shrinked
|
|
| 187 |
+ # horizontally under certain conditions (applies to GroupchatControl)
|
|
| 188 |
+ hscrollbar = self.xml.conversation_scrolledwindow.get_hscrollbar()
|
|
| 189 |
+ hscrollbar.hide()
|
|
| 190 |
+ |
|
| 181 | 191 |
self.xml.conversation_scrolledwindow.add(self.conv_textview.tv)
|
| 182 | 192 |
widget = self.xml.conversation_scrolledwindow.get_vadjustment()
|
| 183 | 193 |
widget.connect('changed', self.on_conversation_vadjustment_changed)
|
| ... | ... | @@ -621,7 +621,6 @@ |
| 621 | 621 |
<object class="GtkScrolledWindow" id="conversation_scrolledwindow">
|
| 622 | 622 |
<property name="height_request">60</property>
|
| 623 | 623 |
<property name="can_focus">True</property>
|
| 624 |
- <property name="hscrollbar_policy">never</property>
|
|
| 625 | 624 |
<property name="shadow_type">in</property>
|
| 626 | 625 |
<property name="overlay_scrolling">False</property>
|
| 627 | 626 |
<signal name="edge-reached" handler="_on_edge_reached" swapped="no"/>
|
| ... | ... | @@ -261,7 +261,6 @@ |
| 261 | 261 |
<property name="height_request">60</property>
|
| 262 | 262 |
<property name="visible">True</property>
|
| 263 | 263 |
<property name="can_focus">True</property>
|
| 264 |
- <property name="hscrollbar_policy">never</property>
|
|
| 265 | 264 |
<property name="shadow_type">in</property>
|
| 266 | 265 |
<property name="overlay_scrolling">False</property>
|
| 267 | 266 |
<signal name="edge-reached" handler="_on_edge_reached" swapped="no"/>
|