Skip to content

Commit

Permalink
fixed description text focus
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonzorn committed Jul 20, 2024
1 parent 998ec2c commit a937300
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 42 deletions.
13 changes: 7 additions & 6 deletions data/ui/dialogs/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'character.ui'
##
## Created by: Qt User Interface Compiler version 6.6.3
## Created by: Qt User Interface Compiler version 6.7.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down Expand Up @@ -40,8 +40,8 @@ def setupUi(self, Dialog):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.image_frame.sizePolicy().hasHeightForWidth())
self.image_frame.setSizePolicy(sizePolicy)
self.image_frame.setFrameShape(QFrame.StyledPanel)
self.image_frame.setFrameShadow(QFrame.Raised)
self.image_frame.setFrameShape(QFrame.Shape.StyledPanel)
self.image_frame.setFrameShadow(QFrame.Shadow.Raised)
self.verticalLayout = QVBoxLayout(self.image_frame)
self.verticalLayout.setObjectName(u"verticalLayout")
self.image = QLabel(self.image_frame)
Expand All @@ -56,8 +56,8 @@ def setupUi(self, Dialog):
self.title_frame = SimpleCardWidget(Dialog)
self.title_frame.setObjectName(u"title_frame")
self.title_frame.setStyleSheet(u"")
self.title_frame.setFrameShape(QFrame.StyledPanel)
self.title_frame.setFrameShadow(QFrame.Raised)
self.title_frame.setFrameShape(QFrame.Shape.StyledPanel)
self.title_frame.setFrameShadow(QFrame.Shadow.Raised)
self.verticalLayout_2 = QVBoxLayout(self.title_frame)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.name_label = BodyLabel(self.title_frame)
Expand Down Expand Up @@ -89,7 +89,8 @@ def setupUi(self, Dialog):

self.description = TextEdit(Dialog)
self.description.setObjectName(u"description")
self.description.setTextInteractionFlags(Qt.NoTextInteraction)
self.description.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.description.setTextInteractionFlags(Qt.TextInteractionFlag.NoTextInteraction)

self.verticalLayout_3.addWidget(self.description)

Expand Down
15 changes: 9 additions & 6 deletions data/ui/dialogs/character.ui
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand All @@ -56,10 +56,10 @@
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
Expand All @@ -85,7 +85,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand Down Expand Up @@ -115,8 +115,11 @@
</item>
<item>
<widget class="TextEdit" name="description">
<property name="focusPolicy">
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
<set>Qt::TextInteractionFlag::NoTextInteraction</set>
</property>
</widget>
</item>
Expand Down
29 changes: 15 additions & 14 deletions data/ui/widgets/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'info.ui'
##
## Created by: Qt User Interface Compiler version 6.6.3
## Created by: Qt User Interface Compiler version 6.7.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down Expand Up @@ -38,18 +38,18 @@ def setupUi(self, Form):
self.scrollArea.setStyleSheet(u"QWidget {background: transparent;}\n"
"QScrollArea {border: none;}\n"
"")
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.scrollArea.setWidgetResizable(True)
self.scrollAreaWidgetContents = QWidget()
self.scrollAreaWidgetContents.setObjectName(u"scrollAreaWidgetContents")
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 454, 994))
self.scrollAreaWidgetContents.setGeometry(QRect(0, 0, 459, 990))
self.verticalLayout = QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout.setObjectName(u"verticalLayout")
self.verticalLayout.setContentsMargins(0, 0, -1, 0)
self.header_frame = SimpleCardWidget(self.scrollAreaWidgetContents)
self.header_frame.setObjectName(u"header_frame")
self.header_frame.setFrameShape(QFrame.StyledPanel)
self.header_frame.setFrameShadow(QFrame.Raised)
self.header_frame.setFrameShape(QFrame.Shape.StyledPanel)
self.header_frame.setFrameShadow(QFrame.Shadow.Raised)
self.horizontalLayout_3 = QHBoxLayout(self.header_frame)
self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
self.horizontalLayout_3.setContentsMargins(9, 9, 9, 9)
Expand All @@ -61,8 +61,8 @@ def setupUi(self, Form):
self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.lib_frame = SimpleCardWidget(self.header_frame)
self.lib_frame.setObjectName(u"lib_frame")
self.lib_frame.setFrameShape(QFrame.StyledPanel)
self.lib_frame.setFrameShadow(QFrame.Raised)
self.lib_frame.setFrameShape(QFrame.Shape.StyledPanel)
self.lib_frame.setFrameShadow(QFrame.Shadow.Raised)
self.horizontalLayout = QHBoxLayout(self.lib_frame)
self.horizontalLayout.setObjectName(u"horizontalLayout")
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
Expand All @@ -82,8 +82,8 @@ def setupUi(self, Form):

self.shikimori_frame = SimpleCardWidget(self.header_frame)
self.shikimori_frame.setObjectName(u"shikimori_frame")
self.shikimori_frame.setFrameShape(QFrame.StyledPanel)
self.shikimori_frame.setFrameShadow(QFrame.Raised)
self.shikimori_frame.setFrameShape(QFrame.Shape.StyledPanel)
self.shikimori_frame.setFrameShadow(QFrame.Shadow.Raised)
self.horizontalLayout_2 = QHBoxLayout(self.shikimori_frame)
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0)
Expand Down Expand Up @@ -177,10 +177,11 @@ def setupUi(self, Form):
self.verticalLayout_9.setObjectName(u"verticalLayout_9")
self.description_text = TextEdit(self.scrollAreaWidgetContents)
self.description_text.setObjectName(u"description_text")
self.description_text.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.description_text.setFocusPolicy(Qt.FocusPolicy.NoFocus)
self.description_text.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAsNeeded)
self.description_text.setUndoRedoEnabled(False)
self.description_text.setReadOnly(True)
self.description_text.setTextInteractionFlags(Qt.NoTextInteraction)
self.description_text.setTextInteractionFlags(Qt.TextInteractionFlag.NoTextInteraction)

self.verticalLayout_9.addWidget(self.description_text)

Expand All @@ -195,7 +196,7 @@ def setupUi(self, Form):

self.characters_list = ListWidget(self.characters_frame)
self.characters_list.setObjectName(u"characters_list")
self.characters_list.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.characters_list.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.characters_list.setWordWrap(True)

self.verticalLayout_2.addWidget(self.characters_list)
Expand All @@ -214,7 +215,7 @@ def setupUi(self, Form):

self.related_list = ListWidget(self.related_frame)
self.related_list.setObjectName(u"related_list")
self.related_list.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.related_list.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
self.related_list.setWordWrap(True)

self.verticalLayout_4.addWidget(self.related_list)
Expand Down Expand Up @@ -247,7 +248,7 @@ def setupUi(self, Form):
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.items_tree.sizePolicy().hasHeightForWidth())
self.items_tree.setSizePolicy(sizePolicy2)
self.items_tree.setContextMenuPolicy(Qt.CustomContextMenu)
self.items_tree.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
self.items_tree.header().setVisible(False)

self.verticalLayout_5.addWidget(self.items_tree)
Expand Down
35 changes: 19 additions & 16 deletions data/ui/widgets/info.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ QScrollArea {border: none;}
</string>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
Expand All @@ -47,8 +47,8 @@ QScrollArea {border: none;}
<rect>
<x>0</x>
<y>0</y>
<width>454</width>
<height>994</height>
<width>459</width>
<height>990</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
Expand All @@ -64,10 +64,10 @@ QScrollArea {border: none;}
<item>
<widget class="SimpleCardWidget" name="header_frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
Expand All @@ -85,7 +85,7 @@ QScrollArea {border: none;}
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand All @@ -100,10 +100,10 @@ QScrollArea {border: none;}
<item>
<widget class="SimpleCardWidget" name="lib_frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
Expand Down Expand Up @@ -134,10 +134,10 @@ QScrollArea {border: none;}
<item>
<widget class="SimpleCardWidget" name="shikimori_frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
Expand Down Expand Up @@ -232,7 +232,7 @@ QScrollArea {border: none;}
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand Down Expand Up @@ -265,8 +265,11 @@ QScrollArea {border: none;}
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="TextEdit" name="description_text">
<property name="focusPolicy">
<enum>Qt::FocusPolicy::NoFocus</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAsNeeded</enum>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
Expand All @@ -275,7 +278,7 @@ QScrollArea {border: none;}
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
<set>Qt::TextInteractionFlag::NoTextInteraction</set>
</property>
</widget>
</item>
Expand All @@ -292,7 +295,7 @@ QScrollArea {border: none;}
<item>
<widget class="ListWidget" name="characters_list">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand All @@ -315,7 +318,7 @@ QScrollArea {border: none;}
<item>
<widget class="ListWidget" name="related_list">
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
Expand Down Expand Up @@ -348,7 +351,7 @@ QScrollArea {border: none;}
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
<enum>Qt::ContextMenuPolicy::CustomContextMenu</enum>
</property>
<attribute name="headerVisible">
<bool>false</bool>
Expand Down

0 comments on commit a937300

Please sign in to comment.