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
6505941d
Commit
6505941d
authored
Dec 09, 2021
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wip/cdavis/use-git-rust-deps' into 'master'
general: Use git gtk-rs dependencies See merge request GNOME/gnome-tour!54
parents
d603eee2
21df0c02
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
15 deletions
+23
-15
Cargo.lock
Cargo.lock
+0
-0
Cargo.toml
Cargo.toml
+4
-4
org.gnome.TourDevel.json
build-aux/org.gnome.TourDevel.json
+11
-0
image.rs
src/widgets/pages/image.rs
+4
-4
welcome.rs
src/widgets/pages/welcome.rs
+2
-2
paginator.rs
src/widgets/paginator.rs
+2
-5
No files found.
Cargo.lock
View file @
6505941d
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
6505941d
...
...
@@ -8,19 +8,19 @@ edition = "2018"
video
=
[
"gst_player"
,
"gst"
]
[dependencies]
gtk
=
{
package
=
"gtk4"
,
version
=
"0.3"
,
features=
["v4_2"]
}
gtk
=
{
git
=
"https://github.com/gtk-rs/gtk4-rs.git"
,
package
=
"gtk4"
,
version
=
"0.3"
,
features=
["v4_2"]
}
log
=
"0.4"
gettext-rs
=
{
version
=
"0.6"
,
features
=
["gettext-system"]
}
libadwaita
=
"0.1.0-alpha-6"
libadwaita
=
{
git
=
"https://gitlab.gnome.org/World/Rust/libadwaita-rs.git"
}
pretty_env_logger
=
"0.4"
[dependencies.gst_player]
version
=
"0.17
"
git
=
"https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
"
package
=
"gstreamer-player"
optional
=
true
[dependencies.gst]
version
=
"0.17
"
git
=
"https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
"
package
=
"gstreamer"
optional
=
true
build-aux/org.gnome.TourDevel.json
View file @
6505941d
...
...
@@ -29,6 +29,17 @@
},
"modules"
:
[
{
"name"
:
"libadwaita"
,
"buildsystem"
:
"meson"
,
"sources"
:
[
{
"type"
:
"git"
,
"url"
:
"https://gitlab.gnome.org/GNOME/libadwaita.git"
,
"branch"
:
"main"
}
]
},
{
"name"
:
"gnome-tour"
,
"buildsystem"
:
"meson"
,
"config-opts"
:
[
...
...
src/widgets/pages/image.rs
View file @
6505941d
...
...
@@ -21,7 +21,7 @@ impl ImagePageWidget {
self
.widget
.set_halign
(
gtk
::
Align
::
Fill
);
self
.widget
.set_valign
(
gtk
::
Align
::
Fill
);
let
container
=
gtk
::
Box
Builder
::
new
()
let
container
=
gtk
::
Box
::
builder
()
.orientation
(
gtk
::
Orientation
::
Vertical
)
.spacing
(
12
)
.halign
(
gtk
::
Align
::
Center
)
...
...
@@ -35,14 +35,14 @@ impl ImagePageWidget {
let
clamp
=
libadwaita
::
Clamp
::
new
();
clamp
.set_child
(
Some
(
&
container
));
let
picture
=
gtk
::
Picture
Builder
::
new
()
let
picture
=
gtk
::
Picture
::
builder
()
.can_shrink
(
false
)
.keep_aspect_ratio
(
true
)
.build
();
picture
.set_resource
(
Some
(
resource_uri
));
container
.append
(
&
picture
);
let
head_label
=
gtk
::
Label
Builder
::
new
()
let
head_label
=
gtk
::
Label
::
builder
()
.label
(
&
head
)
.justify
(
gtk
::
Justification
::
Center
)
.valign
(
gtk
::
Align
::
Center
)
...
...
@@ -51,7 +51,7 @@ impl ImagePageWidget {
head_label
.add_css_class
(
"page-title"
);
container
.append
(
&
head_label
);
let
body_label
=
gtk
::
Label
Builder
::
new
()
let
body_label
=
gtk
::
Label
::
builder
()
.label
(
&
body
)
.lines
(
2
)
.wrap
(
true
)
...
...
src/widgets/pages/welcome.rs
View file @
6505941d
...
...
@@ -65,7 +65,7 @@ impl WelcomePageWidget {
}
fn
init
(
&
self
)
{
let
container
=
gtk
::
Box
Builder
::
new
()
let
container
=
gtk
::
Box
::
builder
()
.orientation
(
gtk
::
Orientation
::
Vertical
)
.spacing
(
0
)
.hexpand
(
true
)
...
...
@@ -83,7 +83,7 @@ impl WelcomePageWidget {
#[cfg(not(feature
=
"video"
))]
let
header
=
{
let
logo
=
gtk
::
Picture
Builder
::
new
()
let
logo
=
gtk
::
Picture
::
builder
()
.can_shrink
(
false
)
.keep_aspect_ratio
(
true
)
.build
();
...
...
src/widgets/paginator.rs
View file @
6505941d
...
...
@@ -27,9 +27,7 @@ impl PaginatorWidget {
widget
,
carousel
:
libadwaita
::
Carousel
::
new
(),
carousel_dots
:
libadwaita
::
CarouselIndicatorDots
::
new
(),
headerbar
:
gtk
::
HeaderBarBuilder
::
new
()
.show_title_buttons
(
false
)
.build
(),
headerbar
:
gtk
::
HeaderBar
::
builder
()
.show_title_buttons
(
false
)
.build
(),
start_btn
:
gtk
::
Button
::
with_label
(
&
gettext
(
"_Start"
)),
next_overlay
:
gtk
::
Overlay
::
new
(),
next_btn
:
gtk
::
Button
::
with_label
(
&
gettext
(
"_Next"
)),
...
...
@@ -115,7 +113,6 @@ impl PaginatorWidget {
self
.carousel_dots
.set_carousel
(
Some
(
&
self
.carousel
));
self
.carousel
.set_hexpand
(
true
);
self
.carousel
.set_vexpand
(
true
);
self
.carousel
.set_animation_duration
(
300
);
self
.carousel
.connect_position_notify
(
clone!
(
@
weak
p
=>
move
|
_
|
{
...
...
@@ -170,7 +167,7 @@ impl PaginatorWidget {
if
page_nr
<
self
.carousel
.n_pages
()
{
let
pages
=
&
self
.pages
.borrow
();
let
page
=
pages
.get
(
page_nr
as
usize
)
.unwrap
();
self
.carousel
.scroll_to
(
page
);
self
.carousel
.scroll_to
(
page
,
true
);
}
}
}
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