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
8cf1a4e9
Commit
8cf1a4e9
authored
Feb 23, 2025
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init ButtonWidget
parent
ca1ae92c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
ButtonWidget.py
src/settings/setting/widgets/ButtonWidget.py
+20
-0
__init__.py
src/settings/setting/widgets/__init__.py
+2
-0
No files found.
src/settings/setting/widgets/ButtonWidget.py
0 → 100644
View file @
8cf1a4e9
from
gi.repository
import
Adw
,
Gtk
from
.BaseWidget
import
BaseWidget
class
ButtonWidget
(
BaseWidget
):
def
create_row
(
self
):
self
.
row
=
Adw
.
ButtonRow
(
title
=
self
.
setting
.
name
,
subtitle
=
self
.
setting
.
help
,
)
self
.
row
.
connect
(
"activated"
,
self
.
_on_button_clicked
)
self
.
row
.
add_suffix
(
self
.
button
)
return
self
.
row
def
_on_button_clicked
(
self
,
button
):
self
.
setting
.
_set_backend_value
(
True
)
\ No newline at end of file
src/settings/setting/widgets/__init__.py
View file @
8cf1a4e9
...
...
@@ -4,6 +4,7 @@ from .RadioChoiceWidget import RadioChoiceWidget
from
.EntryWidget
import
EntryWidget
from
.NumStepper
import
NumStepper
from
.FileChooser
import
FileChooser
from
.ButtonWidget
import
ButtonWidget
class
WidgetFactory
:
widget_map
=
{
...
...
@@ -13,6 +14,7 @@ class WidgetFactory:
'boolean'
:
BooleanWidget
,
'entry'
:
EntryWidget
,
'number'
:
NumStepper
,
'button'
:
ButtonWidget
,
}
@staticmethod
...
...
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