Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
World
Design Tooling
Contrast
Commits
bbc217cf
Commit
bbc217cf
authored
Aug 06, 2019
by
Bilal Elmoussaoui
Browse files
Correctly position the contrast level bar
parent
f86014cc
Pipeline
#102185
passed with stages
in 14 minutes and 52 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/contrast_level.rs
View file @
bbc217cf
...
...
@@ -93,7 +93,6 @@ impl ChartBarWidget {
let
column
=
widget
.upcast
::
<
gtk
::
Widget
>
();
let
column
=
column
.downcast
::
<
gtk
::
Container
>
()
.unwrap
();
column
.add
(
overlay
);
column
.set_margin_bottom
(
24
);
column
.show
();
let
weak_instance
=
Rc
::
downgrade
(
&
s
)
.clone
();
...
...
@@ -166,6 +165,7 @@ impl ContrastLevelBar {
fn
init
(
&
mut
self
)
{
self
.widget
.set_halign
(
gtk
::
Align
::
Fill
);
self
.widget
.set_valign
(
gtk
::
Align
::
Center
);
self
.widget
.set_vexpand
(
true
);
self
.widget
.get_style_context
()
.add_class
(
"level-box"
);
...
...
@@ -177,6 +177,7 @@ impl ContrastLevelBar {
self
.level_label
.get_style_context
()
.add_class
(
"level-label"
);
self
.level_label
.set_halign
(
gtk
::
Align
::
Center
);
self
.level_label
.set_valign
(
gtk
::
Align
::
Start
);
self
.level_label
.show
();
self
.widget
.pack_start
(
&
self
.level_label
,
false
,
false
,
0
);
...
...
src/window.rs
View file @
bbc217cf
...
...
@@ -144,8 +144,8 @@ impl Window {
entries_container
.show
();
self
.headerbar
.set_custom_title
(
Some
(
&
entries_container
));
container
.pack_start
(
&
self
.preview
.borrow
()
.widget
,
true
,
true
,
18
);
container
.pack_start
(
&
self
.levelbar
.borrow
()
.widget
,
false
,
fals
e
,
18
);
container
.pack_start
(
&
self
.preview
.borrow
()
.widget
,
true
,
true
,
24
);
container
.pack_start
(
&
self
.levelbar
.borrow
()
.widget
,
true
,
tru
e
,
24
);
self
.widget
.add
(
&
container
);
// Restore state
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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