Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GNOME Tweaks
Commits
403b0cd8
Commit
403b0cd8
authored
Oct 08, 2020
by
Xi Ruoyao
😿
Committed by
Evan Welsh
Oct 23, 2020
Browse files
Port to libhandy-1
parent
5a43242b
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
403b0cd8
...
...
@@ -21,7 +21,7 @@ RUNTIME DEPENDENCIES
-
GLib (>= 2.58)
-
GTK+ 3 (>= 3.12)
-
gnome-desktop (>= 3.30)
-
libhandy
-
libhandy
(>= 1.0)
-
libsoup
-
libnotify
-
Pango
...
...
gnome-tweaks
View file @
403b0cd8
...
...
@@ -12,7 +12,7 @@ import sys
import
gi
gi
.
require_version
(
"Gtk"
,
"3.0"
)
gi
.
require_version
(
"Handy"
,
"
0.0
"
)
gi
.
require_version
(
"Handy"
,
"
1
"
)
import
gtweak
from
gtweak.defs
import
VERSION
...
...
gtweak/tweakview.py
View file @
403b0cd8
...
...
@@ -23,8 +23,7 @@ class Window(Gtk.ApplicationWindow):
self
.
hsize_group
=
Gtk
.
SizeGroup
(
mode
=
Gtk
.
SizeGroupMode
.
HORIZONTAL
)
self
.
main_box
=
Handy
.
Leaflet
()
self
.
main_box
.
set_mode_transition_type
(
Handy
.
LeafletModeTransitionType
.
SLIDE
)
self
.
main_box
.
set_child_transition_type
(
Handy
.
LeafletChildTransitionType
.
SLIDE
)
self
.
main_box
.
set_transition_type
(
Handy
.
LeafletTransitionType
.
SLIDE
)
left_box
=
self
.
sidebar
()
right_box
=
self
.
main_content
()
...
...
@@ -68,14 +67,13 @@ class Window(Gtk.ApplicationWindow):
def
titlebar
(
self
):
header
=
Handy
.
Leaflet
()
header
.
set_mode_transition_type
(
Handy
.
LeafletModeTransitionType
.
SLIDE
)
header
.
set_child_transition_type
(
Handy
.
LeafletChildTransitionType
.
SLIDE
)
header
.
set_transition_type
(
Handy
.
LeafletTransitionType
.
SLIDE
)
header
.
connect
(
"notify::visible-child"
,
self
.
_update_decorations
)
header
.
connect
(
"notify::fold"
,
self
.
_update_decorations
)
left_header
=
Gtk
.
HeaderBar
()
left_header
=
Handy
.
HeaderBar
()
left_header
.
props
.
show_close_button
=
True
right_header
=
Gtk
.
HeaderBar
()
right_header
=
Handy
.
HeaderBar
()
right_header
.
props
.
show_close_button
=
True
right_header
.
props
.
hexpand
=
True
...
...
@@ -226,9 +224,9 @@ class Window(Gtk.ApplicationWindow):
def
_update_decorations
(
self
,
*
_
):
header
=
self
.
get_titlebar
()
if
header
.
props
.
folded
:
self
.
header_group
.
set_
focus
(
header
.
get_visible_child
()
)
self
.
header_group
.
set_
decorate_all
(
True
)
else
:
self
.
header_group
.
set_
focus
(
Non
e
)
self
.
header_group
.
set_
decorate_all
(
Fals
e
)
def
_after_key_press
(
self
,
widget
,
event
):
if
not
self
.
button
.
get_active
()
or
not
self
.
entry
.
is_focus
():
...
...
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