Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
7d098302
Commit
7d098302
authored
Jul 14, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed combo boxes on ubuntu 10.04
parent
6a7baefb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
mainwindow.py
blink/mainwindow.py
+12
-0
blink.ui
resources/blink.ui
+12
-0
No files found.
blink/mainwindow.py
View file @
7d098302
...
@@ -153,6 +153,18 @@ class MainWindow(base_class, ui_class):
...
@@ -153,6 +153,18 @@ class MainWindow(base_class, ui_class):
font
.
setPixelSize
(
pixel_size
)
font
.
setPixelSize
(
pixel_size
)
self
.
status
.
setFont
(
font
)
self
.
status
.
setFont
(
font
)
# adjust the combo boxes for themes with too much padding (like the default theme on Ubuntu 10.04)
option
=
QStyleOptionComboBox
()
self
.
status
.
initStyleOption
(
option
)
font_metrics
=
self
.
status
.
fontMetrics
()
text_width
=
max
(
font_metrics
.
width
(
self
.
status
.
itemText
(
index
))
for
index
in
xrange
(
self
.
status
.
count
()))
frame_width
=
self
.
status
.
style
()
.
pixelMetric
(
QStyle
.
PM_ComboBoxFrameWidth
,
option
,
self
.
status
)
arrow_width
=
self
.
status
.
style
()
.
subControlRect
(
QStyle
.
CC_ComboBox
,
option
,
QStyle
.
SC_ComboBoxArrow
,
self
.
status
)
.
width
()
wide_padding
=
self
.
status
.
style
()
.
subControlRect
(
QStyle
.
CC_ComboBox
,
option
,
QStyle
.
SC_ComboBoxEditField
,
self
.
status
)
.
height
()
<
10
self
.
status
.
setFixedWidth
(
text_width
+
arrow_width
+
2
*
frame_width
+
30
)
# 30? Don't ask.
self
.
status
.
setStyleSheet
(
"""QComboBox { padding: 0px 3px 0px 3px; }"""
if
wide_padding
else
""
)
self
.
identity
.
setStyleSheet
(
"""QComboBox { padding: 0px 4px 0px 4px; }"""
if
wide_padding
else
""
)
def
closeEvent
(
self
,
event
):
def
closeEvent
(
self
,
event
):
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
self
.
about_panel
.
close
()
self
.
about_panel
.
close
()
...
...
resources/blink.ui
View file @
7d098302
...
@@ -42,6 +42,12 @@
...
@@ -42,6 +42,12 @@
</property>
</property>
<item>
<item>
<widget
class=
"AccountSelector"
name=
"identity"
>
<widget
class=
"AccountSelector"
name=
"identity"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
20
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
...
@@ -154,6 +160,12 @@
...
@@ -154,6 +160,12 @@
</item>
</item>
<item>
<item>
<widget
class=
"QComboBox"
name=
"status"
>
<widget
class=
"QComboBox"
name=
"status"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
18
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<property
name=
"maximumSize"
>
<size>
<size>
<width>
16777215
</width>
<width>
16777215
</width>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment