Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-welcome
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
ximper-welcome
Commits
aca427aa
Commit
aca427aa
authored
Jul 14, 2020
by
Alexander Mikhaylenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up buttons
Use with_label() instead of a manually created label, make the headerbar ones translatable, add mnenonics everywhere.
parent
9d335887
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
welcome.rs
src/widgets/pages/welcome.rs
+4
-4
paginator.rs
src/widgets/paginator.rs
+6
-6
No files found.
src/widgets/pages/welcome.rs
View file @
aca427aa
...
...
@@ -48,17 +48,17 @@ impl WelcomePageWidget {
actions_container
.set_halign
(
gtk
::
Align
::
Center
);
actions_container
.set_margin_top
(
36
);
let
start_tour_btn
=
gtk
::
Button
::
new
();
start_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Take the Tour"
))));
let
start_tour_btn
=
gtk
::
Button
::
with_label
(
&
gettext
(
"_Take the Tour"
));
start_tour_btn
.get_style_context
()
.add_class
(
"suggested-action"
);
start_tour_btn
.set_property_height_request
(
40
);
start_tour_btn
.set_property_width_request
(
180
);
start_tour_btn
.set_use_underline
(
true
);
start_tour_btn
.set_action_name
(
Some
(
"app.start-tour"
));
let
skip_tour_btn
=
gtk
::
Button
::
new
();
skip_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"No Thanks"
))));
let
skip_tour_btn
=
gtk
::
Button
::
with_label
(
&
gettext
(
"_No Thanks"
));
skip_tour_btn
.set_property_height_request
(
40
);
skip_tour_btn
.set_property_width_request
(
180
);
skip_tour_btn
.set_use_underline
(
true
);
skip_tour_btn
.set_action_name
(
Some
(
"app.skip-tour"
));
actions_container
.add
(
&
skip_tour_btn
);
...
...
src/widgets/paginator.rs
View file @
aca427aa
...
...
@@ -25,8 +25,8 @@ impl PaginatorWidget {
widget
,
carousel
:
libhandy
::
Carousel
::
new
(),
headerbar
:
libhandy
::
HeaderBar
::
new
(),
next_btn
:
gtk
::
Button
::
new
(
),
close_btn
:
gtk
::
Button
::
new
(
),
next_btn
:
gtk
::
Button
::
with_label
(
&
gettext
(
"_Next"
)
),
close_btn
:
gtk
::
Button
::
with_label
(
&
gettext
(
"_Close"
)
),
pages
:
RefCell
::
new
(
Vec
::
new
()),
current_page
:
RefCell
::
new
(
0
),
});
...
...
@@ -78,8 +78,8 @@ impl PaginatorWidget {
p
.current_page
.replace
(
page_nr
);
}));
let
previous_btn
=
gtk
::
Button
::
new
(
);
previous_btn
.
add
(
&
gtk
::
Label
::
new
(
Some
(
"Previous"
))
);
let
previous_btn
=
gtk
::
Button
::
with_label
(
&
gettext
(
"_Previous"
)
);
previous_btn
.
set_use_underline
(
true
);
previous_btn
.set_action_name
(
Some
(
"app.previous-page"
));
let
btn_size_group
=
gtk
::
SizeGroup
::
new
(
gtk
::
SizeGroupMode
::
Horizontal
);
...
...
@@ -87,12 +87,12 @@ impl PaginatorWidget {
btn_size_group
.add_widget
(
&
self
.next_btn
);
btn_size_group
.add_widget
(
&
self
.close_btn
);
self
.next_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Next"
))));
self
.next_btn
.get_style_context
()
.add_class
(
"suggested-action"
);
self
.next_btn
.set_use_underline
(
true
);
self
.next_btn
.set_action_name
(
Some
(
"app.next-page"
));
self
.close_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Close"
))));
self
.close_btn
.get_style_context
()
.add_class
(
"suggested-action"
);
self
.close_btn
.set_use_underline
(
true
);
self
.close_btn
.set_action_name
(
Some
(
"app.next-page"
));
let
next_overlay
=
gtk
::
Overlay
::
new
();
...
...
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