Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-unified-theme-switcher
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
1
Merge Requests
1
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
ximper-unified-theme-switcher
Commits
5bfabc0f
Commit
5bfabc0f
authored
Jul 17, 2024
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redesign
parent
45dbb9f6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
216 additions
and
202 deletions
+216
-202
ru.po
po/ru.po
+9
-6
ru.ximperlinux.cmb
ru.ximperlinux.cmb
+0
-122
window.cmb
src/window.cmb
+117
-0
window.css
src/window.css
+19
-0
window.py
src/window.py
+8
-4
window.ui
src/window.ui
+55
-69
ximper-unified-theme-switcher-gui.gresource.xml
src/ximper-unified-theme-switcher-gui.gresource.xml
+1
-0
ximper-unified-theme-switcher-gui.in
src/ximper-unified-theme-switcher-gui.in
+7
-1
No files found.
po/ru.po
View file @
5bfabc0f
...
...
@@ -20,11 +20,14 @@ msgstr "Единый переключатель тем"
msgid "_About Ximper Unified Theme Switcher"
msgstr "О Едином переключателе тем"
msgid "
_Light theme
"
msgstr "
Светлая тема
"
msgid "
Choose themes for styles
"
msgstr "
Выберите темы для стилей
"
msgid "_
Dark theme
"
msgstr "
Тёмная тема
"
msgid "_
Light
"
msgstr "
Светлая
"
msgid "Change style"
msgstr "Сменить стиль"
msgid "_Dark"
msgstr "Тёмная"
msgid "Dark Style"
msgstr "Тёмный Стиль"
ru.ximperlinux.cmb
deleted
100644 → 0
View file @
45dbb9f6
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
<cambalache-project
version=
"0.17.3"
target_tk=
"gtk-4.0"
>
<ui>
(7,1,"window.ui","src/window.ui",None,None,None,None,None,None,None)
</ui>
<ui_library>
(7,"Adw","1.0",None),
(7,"gio","2.0",None),
(7,"gtk","4.0",None),
(7,"libadwaita","1.4",None)
</ui_library>
<object>
(7,1,"AdwApplicationWindow","XimperUnifiedThemeSwitcherGuiGtk4Window",None,None,None,None,None,None,None),
(7,2,"AdwToolbarView",None,1,None,None,None,None,None,None),
(7,3,"GtkBox",None,2,None,None,None,None,None,None),
(7,4,"GtkBox",None,3,None,None,None,None,None,None),
(7,5,"GtkButton","change_style_btn",4,None,None,None,None,None,None),
(7,6,"GtkBox",None,5,None,None,None,None,None,None),
(7,7,"GtkImage",None,6,None,None,None,None,None,None),
(7,8,"GtkLabel",None,6,None,None,None,1,None,None),
(7,9,"GtkBox",None,3,None,None,None,1,None,None),
(7,10,"GtkBox",None,9,None,None,None,None,None,None),
(7,11,"GtkLabel",None,10,None,None,None,None,None,None),
(7,12,"GtkListBox",None,10,None,None,None,1,None,None),
(7,13,"AdwComboRow","kv_light_cr",12,None,None,None,None,None,None),
(7,14,"AdwComboRow","kv_dark_cr",12,None,None,None,1,None,None),
(7,15,"GtkBox",None,9,None,None,None,1,None,None),
(7,16,"GtkLabel",None,15,None,None,None,None,None,None),
(7,17,"GtkListBox",None,15,None,None,None,1,None,None),
(7,18,"AdwComboRow","gtk3_light_cr",17,None,None,None,None,None,None),
(7,19,"AdwComboRow","gtk3_dark_cr",17,None,None,None,1,None,None),
(7,20,"AdwHeaderBar","header_bar",2,None,"top",None,1,None,None),
(7,21,"GtkMenuButton",None,20,None,"end",None,None,None,None),
(7,22,"(menu)","primary_menu",None,None,None,None,None,None,None),
(7,23,"(section)",None,22,None,None,None,None,None,None),
(7,24,"(item)",None,23,None,None,None,None,None,None),
(7,25,"(item)",None,23,None,None,None,1,None,None),
(7,26,"(item)",None,23,None,None,None,2,None,None)
</object>
<object_property>
(7,1,"AdwApplicationWindow","content",None,None,None,None,None,2,None,None,None,None),
(7,1,"GtkWindow","default-height","300",None,None,None,None,None,None,None,None,None),
(7,1,"GtkWindow","default-width","600",None,None,None,None,None,None,None,None,None),
(7,3,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(7,3,"GtkWidget","margin-end","15",None,None,None,None,None,None,None,None,None),
(7,3,"GtkWidget","margin-start","15",None,None,None,None,None,None,None,None,None),
(7,3,"GtkWidget","valign","start",None,None,None,None,None,None,None,None,None),
(7,4,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(7,4,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(7,5,"GtkWidget","halign","center",None,None,None,None,None,None,None,None,None),
(7,5,"GtkWidget","height-request","80",None,None,None,None,None,None,None,None,None),
(7,5,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,5,"GtkWidget","width-request","80",None,None,None,None,None,None,None,None,None),
(7,6,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(7,7,"GtkImage","icon-name","ru.ximperlinux.UnifiedThemeSwitcher",None,None,None,None,None,None,None,None,None),
(7,7,"GtkImage","icon-size","large",None,None,None,None,None,None,None,None,None),
(7,7,"GtkImage","pixel-size","70",None,None,None,None,None,None,None,None,None),
(7,7,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(7,7,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(7,7,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(7,7,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(7,8,"GtkLabel","justify","center",None,None,None,None,None,None,None,None,None),
(7,8,"GtkLabel","label","Change style",1,None,None,None,None,None,None,None,None),
(7,8,"GtkWidget","halign","center",None,None,None,None,None,None,None,None,None),
(7,8,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(7,10,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(7,10,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(7,10,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(7,10,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(7,10,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(7,11,"GtkLabel","label","Kvantum",None,None,None,None,None,None,None,None,None),
(7,11,"GtkWidget","margin-bottom","8",None,None,None,None,None,None,None,None,None),
(7,12,"GtkListBox","selection-mode","none",None,None,None,None,None,None,None,None,None),
(7,12,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,13,"AdwPreferencesRow","title","_Light theme",1,None,None,None,None,None,None,None,None),
(7,13,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(7,13,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,13,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(7,14,"AdwPreferencesRow","title","_Dark theme",1,None,None,None,None,None,None,None,None),
(7,14,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(7,14,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,14,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(7,15,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(7,15,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(7,15,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(7,15,"GtkWidget","margin-start","5",None,None,None,None,None,None,None,None,None),
(7,15,"GtkWidget","margin-top","5",None,None,None,None,None,None,None,None,None),
(7,16,"GtkLabel","label","GTK3",None,None,None,None,None,None,None,None,None),
(7,16,"GtkWidget","margin-bottom","8",None,None,None,None,None,None,None,None,None),
(7,17,"GtkListBox","selection-mode","none",None,None,None,None,None,None,None,None,None),
(7,17,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,18,"AdwPreferencesRow","title","_Light theme",1,None,None,None,None,None,None,None,None),
(7,18,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(7,18,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,18,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(7,19,"AdwPreferencesRow","title","_Dark theme",1,None,None,None,None,None,None,None,None),
(7,19,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(7,19,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(7,19,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(7,21,"GtkMenuButton","icon-name","open-menu-symbolic",None,None,None,None,None,None,None,None,None),
(7,21,"GtkMenuButton","menu-model","22",None,None,None,None,None,None,None,None,None),
(7,21,"GtkMenuButton","primary","True",None,None,None,None,None,None,None,None,None),
(7,21,"GtkWidget","tooltip-text","Menu",1,None,None,None,None,None,None,None,None),
(7,24,"(item)","action","app.preferences",None,None,None,None,None,None,None,None,None),
(7,24,"(item)","label","_Preferences",1,None,None,None,None,None,None,None,None),
(7,25,"(item)","action","win.show-help-overlay",None,None,None,None,None,None,None,None,None),
(7,25,"(item)","label","_Keyboard Shortcuts",1,None,None,None,None,None,None,None,None),
(7,26,"(item)","action","app.about",None,None,None,None,None,None,None,None,None),
(7,26,"(item)","label","_About Ximper-unified-theme-switcher-gui",1,None,None,None,None,None,None,None,None)
</object_property>
<object_data>
(7,12,"GtkWidget",1,1,None,None,None,None,None,None),
(7,12,"GtkWidget",2,2,None,1,None,None,None,None),
(7,17,"GtkWidget",1,1,None,None,None,None,None,None),
(7,17,"GtkWidget",2,2,None,1,None,None,None,None)
</object_data>
<object_data_arg>
(7,12,"GtkWidget",2,2,"name","boxed-list"),
(7,17,"GtkWidget",2,2,"name","boxed-list")
</object_data_arg>
</cambalache-project>
src/window.cmb
0 → 100644
View file @
5bfabc0f
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
<cambalache-project
version=
"0.17.3"
target_tk=
"gtk-4.0"
>
<ui>
(6,1,"window.ui","window.ui",None,None,None,None,None,None,None)
</ui>
<ui_library>
(6,"Adw","1.0",None),
(6,"gio","2.0",None),
(6,"gtk","4.0",None),
(6,"libadwaita","1.4",None)
</ui_library>
<css>
(2,"window.css",None,1)
</css>
<object>
(6,1,"AdwApplicationWindow","XimperUnifiedThemeSwitcherGuiGtk4Window",None,None,None,None,None,None,None),
(6,2,"AdwToolbarView",None,1,None,None,None,None,None,None),
(6,3,"GtkBox",None,2,None,None,None,None,None,None),
(6,4,"GtkLabel",None,3,None,None,None,None,None,None),
(6,5,"GtkBox",None,3,None,None,None,1,None,None),
(6,6,"GtkBox",None,5,None,None,None,None,None,None),
(6,7,"AdwPreferencesGroup",None,6,None,None,None,None,None,None),
(6,8,"AdwComboRow","kv_light_cr",7,None,None,None,None,None,None),
(6,9,"AdwComboRow","kv_dark_cr",7,None,None,None,1,None,None),
(6,10,"GtkBox",None,5,None,None,None,1,None,None),
(6,11,"AdwPreferencesGroup",None,10,None,None,None,None,None,None),
(6,12,"AdwComboRow","gtk3_light_cr",11,None,None,None,None,None,None),
(6,13,"AdwComboRow","gtk3_dark_cr",11,None,None,None,1,None,None),
(6,14,"GtkToggleButton","change_style_btn",3,None,None,None,2,None,None),
(6,15,"GtkBox",None,14,None,None,None,None,None,None),
(6,16,"GtkImage",None,15,None,None,None,None,None,None),
(6,17,"GtkLabel",None,15,None,None,None,1,None,None),
(6,18,"AdwHeaderBar","header_bar",2,None,"top",None,1,None,None),
(6,19,"GtkMenuButton",None,18,None,"end",None,None,None,None),
(6,20,"(menu)","primary_menu",None,None,None,None,None,None,None),
(6,21,"(section)",None,20,None,None,None,None,None,None),
(6,22,"(item)",None,21,None,None,None,None,None,None),
(6,23,"(item)",None,21,None,None,None,1,None,None),
(6,24,"(item)",None,21,None,None,None,2,None,None)
</object>
<object_property>
(6,1,"AdwApplicationWindow","content",None,None,None,None,None,2,None,None,None,None),
(6,1,"GtkWindow","default-height","300",None,None,None,None,None,None,None,None,None),
(6,1,"GtkWindow","default-width","600",None,None,None,None,None,None,None,None,None),
(6,1,"GtkWindow","title","Ximper Unified Theme Switcher",1,None,None,None,None,None,None,None,None),
(6,3,"GtkBox","spacing","15",None,None,None,None,None,None,None,None,None),
(6,3,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(6,3,"GtkWidget","margin-bottom","15",None,None,None,None,None,None,None,None,None),
(6,3,"GtkWidget","margin-end","15",None,None,None,None,None,None,None,None,None),
(6,3,"GtkWidget","margin-start","15",None,None,None,None,None,None,None,None,None),
(6,3,"GtkWidget","valign","start",None,None,None,None,None,None,None,None,None),
(6,4,"GtkLabel","label","Choose themes for styles",1,None,None,None,None,None,None,None,None),
(6,5,"GtkBox","spacing","15",None,None,None,None,None,None,None,None,None),
(6,6,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(6,7,"AdwPreferencesGroup","title","Kvantum",None,None,None,None,None,None,None,None,None),
(6,8,"AdwPreferencesRow","title","_Light",1,None,None,None,None,None,None,None,None),
(6,8,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(6,8,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(6,8,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(6,9,"AdwPreferencesRow","title","_Dark",1,None,None,None,None,None,None,None,None),
(6,9,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(6,9,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(6,9,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(6,10,"GtkOrientable","orientation","vertical",None,None,None,None,None,None,None,None,None),
(6,10,"GtkWidget","margin-bottom","5",None,None,None,None,None,None,None,None,None),
(6,11,"AdwPreferencesGroup","title","GTK",None,None,None,None,None,None,None,None,None),
(6,12,"AdwPreferencesRow","title","_Light",1,None,None,None,None,None,None,None,None),
(6,12,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(6,12,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(6,12,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(6,13,"AdwPreferencesRow","title","_Dark",1,None,None,None,None,None,None,None,None),
(6,13,"AdwPreferencesRow","use-underline","True",None,None,None,None,None,None,None,None,None),
(6,13,"GtkWidget","hexpand","True",None,None,None,None,None,None,None,None,None),
(6,13,"GtkWidget","width-request","100",None,None,None,None,None,None,None,None,None),
(6,14,"GtkWidget","halign","center",None,None,None,None,None,None,None,None,None),
(6,15,"GtkBox","spacing","5",None,None,None,None,None,None,None,None,None),
(6,15,"GtkWidget","halign","center",None,None,None,None,None,None,None,None,None),
(6,15,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(6,16,"GtkImage","icon-name","ru.ximperlinux.UnifiedThemeSwitcher",None,None,None,None,None,None,None,None,None),
(6,16,"GtkImage","icon-size","large",None,None,None,None,None,None,None,None,None),
(6,16,"GtkWidget","halign","center",None,None,None,None,None,None,None,None,None),
(6,16,"GtkWidget","valign","center",None,None,None,None,None,None,None,None,None),
(6,17,"GtkLabel","label","Dark Style",1,None,None,None,None,None,None,None,None),
(6,17,"GtkWidget","margin-end","5",None,None,None,None,None,None,None,None,None),
(6,19,"GtkMenuButton","icon-name","open-menu-symbolic",None,None,None,None,None,None,None,None,None),
(6,19,"GtkMenuButton","menu-model","20",None,None,None,None,None,None,None,None,None),
(6,19,"GtkMenuButton","primary","True",None,None,None,None,None,None,None,None,None),
(6,19,"GtkWidget","tooltip-text","Menu",1,None,None,None,None,None,None,None,None),
(6,22,"(item)","action","app.preferences",None,None,None,None,None,None,None,None,None),
(6,22,"(item)","label","_Preferences",1,None,None,None,None,None,None,None,None),
(6,23,"(item)","action","win.show-help-overlay",None,None,None,None,None,None,None,None,None),
(6,23,"(item)","label","_Keyboard Shortcuts",1,None,None,None,None,None,None,None,None),
(6,24,"(item)","action","app.about",None,None,None,None,None,None,None,None,None),
(6,24,"(item)","label","_About Ximper Unified Theme Switcher",1,None,None,None,None,None,None,None,None)
</object_property>
<object_data>
(6,4,"GtkWidget",1,1,None,None,None,None,None,None),
(6,4,"GtkWidget",2,2,None,1,None,None,None,None),
(6,6,"GtkWidget",1,1,None,None,None,None,None,None),
(6,6,"GtkWidget",2,2,None,1,None,None,None,None),
(6,10,"GtkWidget",1,1,None,None,None,None,None,None),
(6,10,"GtkWidget",2,2,None,1,None,None,None,None),
(6,15,"GtkWidget",1,1,None,None,None,None,None,None),
(6,14,"GtkWidget",1,1,None,None,None,None,None,None),
(6,14,"GtkWidget",2,2,None,1,None,None,None,None),
(6,17,"GtkWidget",1,1,None,None,None,None,None,None),
(6,17,"GtkWidget",2,2,None,1,None,None,None,None)
</object_data>
<object_data_arg>
(6,4,"GtkWidget",2,2,"name","title-3"),
(6,6,"GtkWidget",2,2,"name","box-border"),
(6,10,"GtkWidget",2,2,"name","box-border"),
(6,14,"GtkWidget",2,2,"name","maintoggle"),
(6,17,"GtkWidget",2,2,"name","maintogglelabel")
</object_data_arg>
</cambalache-project>
src/window.css
0 → 100644
View file @
5bfabc0f
/* style.css */
.box-border
{
border-style
:
solid
;
border-color
:
@
theme_selected_bg_color
;
/* Цвет обводки */
border-width
:
2px
;
/* Ширина обводки */
border-radius
:
10px
;
/* Радиус закругления углов */
padding
:
15px
;
/* Внутренние отступы */
}
.maintoggle
:checked
{
color
:
@
theme_selected_bg_color
;
/* темный цвет фона */
font-size
:
14px
;
font-weight
:
bold
;
}
.maintoggle
:checked
.maintogglelabel
{
color
:
white
;
}
\ No newline at end of file
src/window.py
View file @
5bfabc0f
...
...
@@ -41,9 +41,6 @@ class XimperUnifiedThemeSwitcherGuiGtk4Window(Adw.ApplicationWindow):
def
__init__
(
self
,
**
kwargs
):
super
()
.
__init__
(
**
kwargs
)
self
.
change_style_btn
.
connect
(
'clicked'
,
self
.
change_style
)
kv_themes_list
=
make_kv_themes_list
()
gtk3_themes_list
=
make_gtk3_themes_list
()
...
...
@@ -57,6 +54,13 @@ class XimperUnifiedThemeSwitcherGuiGtk4Window(Adw.ApplicationWindow):
]
configure_cr_widgets
(
crs_configurations
,
self
.
cr_theme_selected
)
if
Gio
.
Settings
.
new
(
'org.gnome.desktop.interface'
)
.
get_string
(
'color-scheme'
)
==
'prefer-dark'
:
self
.
change_style_btn
.
set_active
(
True
)
else
:
self
.
change_style_btn
.
set_active
(
False
)
self
.
change_style_btn
.
connect
(
'toggled'
,
self
.
change_style
,
"1"
)
def
cr_theme_selected
(
self
,
cr
,
_pspec
,
cfg_key
):
cfg_new_value
=
cr
.
props
.
selected_item
.
props
.
string
...
...
@@ -64,7 +68,7 @@ class XimperUnifiedThemeSwitcherGuiGtk4Window(Adw.ApplicationWindow):
print
(
f
"For {cfg_key} selected {cfg_new_value}"
)
write_config
(
cfg_key
,
cfg_new_value
)
def
change_style
(
self
,
_button
):
def
change_style
(
self
,
_button
,
name
):
schema
=
'org.gnome.desktop.interface'
key
=
'color-scheme'
...
...
src/window.ui
View file @
5bfabc0f
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.9
0.4
-->
<!-- Created with Cambalache 0.9
1.1
-->
<interface>
<!-- interface-name window.ui -->
<requires
lib=
"Adw"
version=
"1.0"
/>
...
...
@@ -11,71 +11,33 @@
<object
class=
"AdwToolbarView"
>
<child>
<object
class=
"GtkBox"
>
<property
name=
"margin-bottom"
>
15
</property>
<property
name=
"margin-end"
>
15
</property>
<property
name=
"margin-start"
>
15
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
15
</property>
<property
name=
"valign"
>
start
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"valign"
>
center
</property>
<child>
<object
class=
"GtkButton"
id=
"change_style_btn"
>
<property
name=
"halign"
>
center
</property>
<property
name=
"height-request"
>
80
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"width-request"
>
80
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkImage"
>
<property
name=
"icon-name"
>
ru.ximperlinux.UnifiedThemeSwitcher
</property>
<property
name=
"icon-size"
>
large
</property>
<property
name=
"margin-bottom"
>
5
</property>
<property
name=
"margin-end"
>
5
</property>
<property
name=
"margin-start"
>
5
</property>
<property
name=
"margin-top"
>
5
</property>
<property
name=
"pixel-size"
>
70
</property>
</object>
</child>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"halign"
>
center
</property>
<property
name=
"justify"
>
center
</property>
<property
name=
"label"
translatable=
"yes"
>
Change style
</property>
<property
name=
"valign"
>
center
</property>
</object>
</child>
</object>
</child>
</object>
</child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
translatable=
"yes"
>
Choose themes for styles
</property>
<style>
<class
name=
"title-3"
/>
</style>
</object>
</child>
<child>
<object
class=
"GtkBox"
>
<property
name=
"spacing"
>
15
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"margin-bottom"
>
5
</property>
<property
name=
"margin-end"
>
5
</property>
<property
name=
"margin-start"
>
5
</property>
<property
name=
"margin-top"
>
5
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
>
Kvantum
</property>
<property
name=
"margin-bottom"
>
8
</property>
</object>
</child>
<child>
<object
class=
"GtkListBox"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"selection-mode"
>
none
</property>
<object
class=
"AdwPreferencesGroup"
>
<property
name=
"title"
>
Kvantum
</property>
<child>
<object
class=
"AdwComboRow"
id=
"kv_light_cr"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"title"
translatable=
"yes"
>
_Light
theme
</property>
<property
name=
"title"
translatable=
"yes"
>
_Light
</property>
<property
name=
"use-underline"
>
True
</property>
<property
name=
"width-request"
>
100
</property>
</object>
...
...
@@ -83,39 +45,29 @@
<child>
<object
class=
"AdwComboRow"
id=
"kv_dark_cr"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"title"
translatable=
"yes"
>
_Dark
theme
</property>
<property
name=
"title"
translatable=
"yes"
>
_Dark
</property>
<property
name=
"use-underline"
>
True
</property>
<property
name=
"width-request"
>
100
</property>
</object>
</child>
<style>
<class
name=
"boxed-list"
/>
</style>
</object>
</child>
<style>
<class
name=
"box-border"
/>
</style>
</object>
</child>
<child>
<object
class=
"GtkBox"
>
<property
name=
"margin-bottom"
>
5
</property>
<property
name=
"margin-end"
>
5
</property>
<property
name=
"margin-start"
>
5
</property>
<property
name=
"margin-top"
>
5
</property>
<property
name=
"orientation"
>
vertical
</property>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
>
GTK3
</property>
<property
name=
"margin-bottom"
>
8
</property>
</object>
</child>
<child>
<object
class=
"GtkListBox"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"selection-mode"
>
none
</property>
<object
class=
"AdwPreferencesGroup"
>
<property
name=
"title"
>
GTK
</property>
<child>
<object
class=
"AdwComboRow"
id=
"gtk3_light_cr"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"title"
translatable=
"yes"
>
_Light
theme
</property>
<property
name=
"title"
translatable=
"yes"
>
_Light
</property>
<property
name=
"use-underline"
>
True
</property>
<property
name=
"width-request"
>
100
</property>
</object>
...
...
@@ -123,18 +75,51 @@
<child>
<object
class=
"AdwComboRow"
id=
"gtk3_dark_cr"
>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"title"
translatable=
"yes"
>
_Dark
theme
</property>
<property
name=
"title"
translatable=
"yes"
>
_Dark
</property>
<property
name=
"use-underline"
>
True
</property>
<property
name=
"width-request"
>
100
</property>
</object>
</child>
</object>
</child>
<style>
<class
name=
"box-border"
/>
</style>
</object>
</child>
</object>
</child>
<child>
<object
class=
"GtkToggleButton"
id=
"change_style_btn"
>
<property
name=
"halign"
>
center
</property>
<child>
<object
class=
"GtkBox"
>
<property
name=
"halign"
>
center
</property>
<property
name=
"spacing"
>
5
</property>
<property
name=
"valign"
>
center
</property>
<child>
<object
class=
"GtkImage"
>
<property
name=
"halign"
>
center
</property>
<property
name=
"icon-name"
>
ru.ximperlinux.UnifiedThemeSwitcher
</property>
<property
name=
"icon-size"
>
large
</property>
<property
name=
"valign"
>
center
</property>
</object>
</child>
<child>
<object
class=
"GtkLabel"
>
<property
name=
"label"
translatable=
"yes"
>
Dark Style
</property>
<property
name=
"margin-end"
>
5
</property>
<style>
<class
name=
"
boxed-list
"
/>
<class
name=
"
maintogglelabel
"
/>
</style>
</object>
</child>
<style/>
</object>
</child>
<style>
<class
name=
"maintoggle"
/>
</style>
</object>
</child>
</object>
...
...
@@ -155,6 +140,7 @@
</property>
<property
name=
"default-height"
>
300
</property>
<property
name=
"default-width"
>
600
</property>
<property
name=
"title"
translatable=
"yes"
>
Ximper Unified Theme Switcher
</property>
</template>
<menu
id=
"primary_menu"
>
<section>
...
...
src/ximper-unified-theme-switcher-gui.gresource.xml
View file @
5bfabc0f
...
...
@@ -2,6 +2,7 @@
<gresources>
<gresource
prefix=
"/ru/ximperlinux/UnifiedThemeSwitcher"
>
<file
preprocess=
"xml-stripblanks"
>
window.ui
</file>
<file>
window.css
</file>
<file
preprocess=
"xml-stripblanks"
>
gtk/help-overlay.ui
</file>
</gresource>
</gresources>
src/ximper-unified-theme-switcher-gui.in
View file @
5bfabc0f
...
...
@@ -42,10 +42,16 @@ gettext.install('ximper-unified-theme-switcher-gui', localedir)
if __name__ == '__main__':
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gio, Gtk, Gdk
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'ximper-unified-theme-switcher-gui.gresource'))
resource._register()
provider = Gtk.CssProvider()
provider.load_from_resource("/ru/ximperlinux/UnifiedThemeSwitcher/window.css")
display = Gdk.Display.get_default()
Gtk.StyleContext.add_provider_for_display(display, provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
from ximper_unified_theme_switcher_gui_gtk4 import main
sys.exit(main.main(VERSION))
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