Disable overlay scrolling
This commit is contained in:
parent
174a429d20
commit
7ab6ed7e16
|
@ -318,12 +318,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
|
|||
|
||||
# add MessageTextView to UI and connect signals
|
||||
self.msg_textview = MessageTextView()
|
||||
|
||||
self.msg_scrolledwindow = ScrolledWindow()
|
||||
self.msg_scrolledwindow.set_max_content_height(100)
|
||||
self.msg_scrolledwindow.set_propagate_natural_height(True)
|
||||
self.msg_scrolledwindow.get_style_context().add_class('scrolledtextview')
|
||||
self.msg_scrolledwindow.set_property('shadow_type', Gtk.ShadowType.IN)
|
||||
self.msg_scrolledwindow.add(self.msg_textview)
|
||||
|
||||
hbox = self.xml.get_object('hbox')
|
||||
|
@ -1345,6 +1340,14 @@ class ScrolledWindow(Gtk.ScrolledWindow):
|
|||
def __init__(self, *args, **kwargs):
|
||||
Gtk.ScrolledWindow.__init__(self, *args, **kwargs)
|
||||
|
||||
self.set_overlay_scrolling(False)
|
||||
self.set_max_content_height(100)
|
||||
self.set_propagate_natural_height(True)
|
||||
self.get_style_context().add_class('scrolled-no-border')
|
||||
self.get_style_context().add_class('no-scroll-indicator')
|
||||
self.get_style_context().add_class('scrollbar-style')
|
||||
self.set_shadow_type(Gtk.ShadowType.IN)
|
||||
|
||||
def do_get_preferred_height(self):
|
||||
min_height, natural_height = Gtk.ScrolledWindow.do_get_preferred_height(self)
|
||||
child = self.get_child()
|
||||
|
|
|
@ -591,11 +591,14 @@
|
|||
<property name="height_request">60</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="overlay_scrolling">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<style>
|
||||
<class name="scrolled-no-border"/>
|
||||
<class name="no-scroll-indicator"/>
|
||||
<class name="scrollbar-style"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -186,11 +186,14 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="overlay_scrolling">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<style>
|
||||
<class name="scrolled-no-border"/>
|
||||
<class name="no-scroll-indicator"/>
|
||||
<class name="scrollbar-style"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -356,6 +359,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin_left">4</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
|
@ -371,6 +375,7 @@
|
|||
</child>
|
||||
<style>
|
||||
<class name="scrolled-no-border"/>
|
||||
<class name="no-scroll-indicator"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
}
|
||||
|
||||
.scrolled-no-border {border: none}
|
||||
.scrolled-no-border undershoot.top, undershoot.bottom { background-image: none; }
|
||||
.no-scroll-indicator undershoot.top, undershoot.bottom { background-image: none; }
|
||||
.scrollbar-style scrollbar trough {background-color:@theme_base_color; }
|
||||
.scrollbar-style scrollbar {border:none; }
|
||||
|
||||
.actionbar-no-border box {border: none}
|
||||
|
||||
|
@ -21,8 +23,6 @@
|
|||
|
||||
#MessageWindow, #RosterWindow paned { background-color: @theme_base_color; }
|
||||
|
||||
.scrolledtextview { border:none; }
|
||||
|
||||
.chatcontrol-separator-top {margin-top: 5px;}
|
||||
|
||||
.chatcontrol-separator {margin-bottom: 5px;}
|
||||
|
|
Loading…
Reference in New Issue