3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 01:15:36 +02:00

Fix chat input textbox to use native scrollbar

The border around the textedit was causing QT to use a non-native
scrollbar.  Moving the box into a frame that contains the border styling
fixes this.
This commit is contained in:
Ryan Huffman 2014-04-23 16:15:51 -07:00
parent d56a4e169e
commit b0e1eab7ed

View file

@ -186,9 +186,9 @@ QPushButton:pressed {
</widget>
</item>
<item>
<widget class="ChatInputArea" name="messagePlainTextEdit">
<widget class="QFrame" name="chatFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -196,33 +196,77 @@ QPushButton:pressed {
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
<height>78</height>
</size>
</property>
<property name="font">
<font>
<family>Helvetica,Arial,sans-serif</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">border-color: palette(dark); border-style: solid; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px;</string>
<string notr="true">#chatFrame {
border-color: palette(dark); border-style: solid; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px;
}</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="tabChangesFocus">
<bool>true</bool>
</property>
<property name="acceptRichText">
<bool>false</bool>
<property name="lineWidth">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="ChatInputArea" name="messagePlainTextEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="font">
<font>
<family>Helvetica,Arial,sans-serif</family>
<pointsize>14</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="tabChangesFocus">
<bool>true</bool>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -237,7 +281,6 @@ QPushButton:pressed {
</customwidget>
</customwidgets>
<tabstops>
<tabstop>messagePlainTextEdit</tabstop>
<tabstop>messagesScrollArea</tabstop>
</tabstops>
<resources/>