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
9d335887
You need to sign in or sign up before continuing.
Commit
9d335887
authored
Jul 14, 2020
by
Alexander Mikhaylenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
paginator: Switch page in the middle of the transition and not at the end
Take the position and round it, make the transition a bit more responsive.
parent
cb108979
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
paginator.rs
src/widgets/paginator.rs
+2
-3
No files found.
src/widgets/paginator.rs
View file @
9d335887
...
@@ -69,13 +69,12 @@ impl PaginatorWidget {
...
@@ -69,13 +69,12 @@ impl PaginatorWidget {
p
.close_btn
.set_opacity
(
opacity
);
p
.close_btn
.set_opacity
(
opacity
);
p
.close_btn
.set_visible
(
opacity
>
0
_f64
);
p
.close_btn
.set_visible
(
opacity
>
0
_f64
);
}));
self
.carousel
.connect_page_changed
(
clone!
(
@
weak
p
=>
move
|
_carousel
,
page_nr
|
{
let
page_nr
=
position
.round
()
as
u32
;
let
pages
=
&
p
.pages
.borrow
();
let
pages
=
&
p
.pages
.borrow
();
let
page
=
pages
.get
(
page_nr
as
usize
)
.unwrap
();
let
page
=
pages
.get
(
page_nr
as
usize
)
.unwrap
();
p
.headerbar
.set_title
(
Some
(
&
page
.get_title
()));
p
.headerbar
.set_title
(
Some
(
&
page
.get_title
()));
p
.current_page
.replace
(
page_nr
);
p
.current_page
.replace
(
page_nr
);
}));
}));
...
...
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