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
2f7d6d18
Unverified
Commit
2f7d6d18
authored
Jan 23, 2025
by
Vladimir Vaskov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change sidebat appearence
parent
72b72e46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
41 deletions
+38
-41
main.py
src/settings/main.py
+4
-4
panel_row.blp
src/settings/widgets/panel_row.blp
+26
-16
panel_row.py
src/settings/widgets/panel_row.py
+7
-19
window.py
src/window.py
+1
-2
No files found.
src/settings/main.py
View file @
2f7d6d18
...
...
@@ -275,9 +275,9 @@ class Page:
stack_page
.
set_name
(
self
.
name
)
row
=
TuneItPanelRow
()
row
.
set_name
(
self
.
name
)
row
.
set_title
(
self
.
name
)
row
.
icon_name
=
self
.
icon
row
.
props
.
name
=
self
.
name
row
.
props
.
title
=
self
.
name
row
.
props
.
icon_name
=
self
.
icon
listbox
.
append
(
row
)
else
:
print
(
f
"the page {self.name} is empty, ignored"
)
...
...
@@ -335,7 +335,7 @@ def init_settings_stack(stack, listbox, split_view):
def
on_row_selected
(
listbox
,
row
):
if
row
:
page_id
=
row
.
get_name
()
page_id
=
row
.
props
.
name
print
(
f
"Selected page: {page_id}"
)
visible_child
=
stack
.
get_child_by_name
(
page_id
)
...
...
src/settings/widgets/panel_row.blp
View file @
2f7d6d18
using Gtk 4.0;
using Adw 1;
template $TuneItPanelRow:
Adw.Preferences
Row {
child:
Box {
template $TuneItPanelRow:
ListBox
Row {
Box {
spacing: 12;
margin-
start
: 6;
margin-
end
: 6;
margin-
top: 1
2;
margin-
bottom: 1
2;
margin-
top
: 6;
margin-
bottom
: 6;
margin-
start:
2;
margin-
end:
2;
Image thumbnail_image {
icon-name: bind template.icon-name;
...
...
@@ -15,17 +14,28 @@ template $TuneItPanelRow: Adw.PreferencesRow {
Box {
orientation: vertical;
Label label {
valign: center;
spacing: 2;
Label title_label {
label: bind template.title;
halign: start;
justify: left;
wrap: true;
}
// Label sub_label {
// label: bind template.subtitle;
// styles [
// "caption"
// ]
// }
Label subtitle_label {
styles [
"caption",
"dim-label",
]
label: bind template.subtitle;
visible: bind template.subtitle-visible;
halign: start;
justify: left;
wrap: true;
}
}
}
;
}
}
src/settings/widgets/panel_row.py
View file @
2f7d6d18
...
...
@@ -2,24 +2,12 @@ from gi.repository import GObject, Adw, Gtk
@Gtk.Template
(
resource_path
=
'/ru.ximperlinux.TuneIt/settings/widgets/panel_row.ui'
)
class
TuneItPanelRow
(
Adw
.
PreferencesRow
):
__gtype_name__
=
"TuneItPanelRow"
def
__init__
(
self
,
**
kwargs
):
super
()
.
__init__
(
**
kwargs
)
@GObject.Property
(
type
=
str
,
default
=
""
)
def
icon_name
(
self
):
return
self
.
_icon_name
class
TuneItPanelRow
(
Gtk
.
ListBoxRow
):
@icon_name.setter
def
icon_name
(
self
,
icon_name
):
self
.
_icon_name
=
icon_name
@GObject.Property
(
type
=
str
,
default
=
""
)
def
subtitle
(
self
):
return
self
.
_subtitle
__gtype_name__
=
"TuneItPanelRow"
@subtitle.setter
def
subtitle
(
self
,
subtitle
):
self
.
_subtitle
=
subtitle
name
=
GObject
.
Property
(
type
=
str
,
default
=
''
)
title
=
GObject
.
Property
(
type
=
str
,
default
=
''
)
subtitle
=
GObject
.
Property
(
type
=
str
,
default
=
''
)
subtitle_visible
=
GObject
.
Property
(
type
=
bool
,
default
=
False
)
icon_name
=
GObject
.
Property
(
type
=
str
,
default
=
''
)
src/window.py
View file @
2f7d6d18
...
...
@@ -53,4 +53,4 @@ class TuneitWindow(Adw.ApplicationWindow):
self
.
settings_pagestack
,
self
.
settings_listbox
,
self
.
settings_split_view
,
)
\ No newline at end of file
)
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