Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
tuneit
Commits
41297046
Commit
41297046
authored
May 05, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix elements going out the window
parent
3bcbabca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
ChoiceWidget.py
src/settings/setting/widgets/ChoiceWidget.py
+1
-14
No files found.
src/settings/setting/widgets/ChoiceWidget.py
View file @
41297046
...
...
@@ -14,8 +14,7 @@ class ChoiceWidget(BaseWidget):
self
.
handler_id
=
self
.
dropdown
.
connect
(
"notify::selected"
,
self
.
_on_choice_changed
)
self
.
row
.
set_activatable_widget
(
self
.
dropdown
)
self
.
_set_dropdown_width
(
items
)
self
.
_update_dropdown_selection
()
...
...
@@ -37,18 +36,6 @@ class ChoiceWidget(BaseWidget):
with
self
.
dropdown
.
handler_block
(
self
.
handler_id
):
self
.
dropdown
.
set_selected
(
current_index
)
def
_set_dropdown_width
(
self
,
items
):
layout
=
self
.
dropdown
.
create_pango_layout
(
""
)
width
=
0
for
item
in
items
:
layout
.
set_text
(
item
)
text_width
=
layout
.
get_pixel_size
()[
0
]
if
text_width
>
width
:
width
=
text_width
self
.
dropdown
.
set_size_request
(
width
+
50
,
-
1
)
def
_on_choice_changed
(
self
,
dropdown
,
_
):
selected
=
dropdown
.
get_selected
()
if
selected
<
0
or
selected
>=
len
(
self
.
setting
.
map
):
...
...
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