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
d37ad844
Commit
d37ad844
authored
Dec 31, 2021
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'wip/exalm/colors'
# Conflicts: # data/resources/style.css
parents
1c6db828
2abafa14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
28 deletions
+16
-28
Cargo.lock
Cargo.lock
+0
-0
Cargo.toml
Cargo.toml
+4
-4
style.css
data/resources/style.css
+0
-15
application.rs
src/application.rs
+0
-1
main.rs
src/main.rs
+8
-2
image.rs
src/widgets/pages/image.rs
+1
-2
welcome.rs
src/widgets/pages/welcome.rs
+1
-1
paginator.rs
src/widgets/paginator.rs
+2
-0
window.rs
src/widgets/window.rs
+0
-3
No files found.
Cargo.lock
View file @
d37ad844
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
d37ad844
...
...
@@ -8,19 +8,19 @@ edition = "2018"
video
=
[
"gst_player"
,
"gst"
]
[dependencies]
gtk
=
{
git
=
"https://github.com/gtk-rs/gtk4-rs.git"
,
package
=
"gtk4"
,
version
=
"0.3"
,
features=
["v4_2"]
}
gtk
=
{
package
=
"gtk4"
,
version
=
"0.3"
,
features=
["v4_2"]
}
log
=
"0.4"
gettext-rs
=
{
version
=
"0.6"
,
features
=
["gettext-system"]
}
libadwaita
=
{
git
=
"https://gitlab.gnome.org/World/Rust/libadwaita-rs.git"
}
libadwaita
=
"0.1.0-beta-1"
pretty_env_logger
=
"0.4"
[dependencies.gst_player]
git
=
"https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
"
version
=
"0.17
"
package
=
"gstreamer-player"
optional
=
true
[dependencies.gst]
git
=
"https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
"
version
=
"0.17
"
package
=
"gstreamer"
optional
=
true
data/resources/style.css
View file @
d37ad844
.large-title
{
font-weight
:
300
;
font-size
:
24pt
;
letter-spacing
:
0.2rem
;
}
.page-title
{
font-weight
:
600
;
font-size
:
20pt
;
}
.page-body
{
font-weight
:
400
;
font-size
:
12pt
;
}
.video
{
opacity
:
0
;
}
...
...
@@ -60,5 +47,3 @@ window .titlebar button {
background-position
:
center
30%
;
animation
:
left-and-right
2s
ease-in-out
infinite
alternate
;
}
.last-page
{
}
.last-page
.page-title
,
.last-page
.page-body
{
}
src/application.rs
View file @
d37ad844
use
crate
::
config
;
use
crate
::
utils
;
use
crate
::
widgets
::
Window
;
use
gtk
::
gdk
;
use
gtk
::
gio
::{
self
,
prelude
::
*
};
use
gtk
::
glib
::{
self
,
clone
};
use
gtk
::
prelude
::
*
;
...
...
src/main.rs
View file @
d37ad844
...
...
@@ -14,8 +14,14 @@ fn main() {
pretty_env_logger
::
init
();
// Prepare i18n
setlocale
(
LocaleCategory
::
LcAll
,
""
);
bindtextdomain
(
GETTEXT_PACKAGE
,
LOCALEDIR
);
textdomain
(
GETTEXT_PACKAGE
);
bindtextdomain
(
GETTEXT_PACKAGE
,
LOCALEDIR
)
.expect
(
&
format!
(
"Unable to bind text domain for {}"
,
GETTEXT_PACKAGE
));
textdomain
(
GETTEXT_PACKAGE
)
.expect
(
&
format!
(
"Unable to switch to text domain {}"
,
GETTEXT_PACKAGE
));
glib
::
set_application_name
(
&
gettext
(
"Tour"
));
glib
::
set_prgname
(
Some
(
"Tour"
));
...
...
src/widgets/pages/image.rs
View file @
d37ad844
...
...
@@ -48,7 +48,7 @@ impl ImagePageWidget {
.valign
(
gtk
::
Align
::
Center
)
.margin_top
(
36
)
.build
();
head_label
.add_css_class
(
"
page-title
"
);
head_label
.add_css_class
(
"
title-1
"
);
container
.append
(
&
head_label
);
let
body_label
=
gtk
::
Label
::
builder
()
...
...
@@ -59,7 +59,6 @@ impl ImagePageWidget {
.valign
(
gtk
::
Align
::
Center
)
.margin_top
(
12
)
.build
();
body_label
.add_css_class
(
"page-body"
);
container
.append
(
&
body_label
);
self
.widget
.append
(
&
clamp
);
...
...
src/widgets/pages/welcome.rs
View file @
d37ad844
...
...
@@ -158,7 +158,7 @@ impl WelcomePageWidget {
let
title
=
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Start the Tour"
)));
title
.set_margin_top
(
36
);
title
.add_css_class
(
"
page-title
"
);
title
.add_css_class
(
"
title-1
"
);
container
.append
(
&
title
);
let
name
=
glib
::
os_info
(
"NAME"
)
.unwrap_or_else
(||
"GNOME"
.into
());
...
...
src/widgets/paginator.rs
View file @
d37ad844
...
...
@@ -113,6 +113,8 @@ impl PaginatorWidget {
self
.carousel_dots
.set_carousel
(
Some
(
&
self
.carousel
));
self
.carousel
.set_hexpand
(
true
);
self
.carousel
.set_vexpand
(
true
);
self
.carousel
.set_scroll_params
(
&
libadwaita
::
SpringParams
::
new
(
1.0
,
0.5
,
300.0
));
self
.carousel
.connect_position_notify
(
clone!
(
@
weak
p
=>
move
|
_
|
{
...
...
src/widgets/window.rs
View file @
d37ad844
use
crate
::
utils
::
i18n_f
;
use
gettextrs
::
gettext
;
use
gtk
::
glib
;
use
gtk
::
prelude
::
*
;
...
...
@@ -96,8 +95,6 @@ impl Window {
.upcast
::
<
gtk
::
Widget
>
(),
);
let
name
=
glib
::
os_info
(
"NAME"
)
.unwrap_or_else
(||
"GNOME"
.into
());
let
version
=
glib
::
os_info
(
"VERSION"
)
.unwrap_or_else
(||
""
.into
());
let
last_page
=
ImagePageWidget
::
new
(
"/org/gnome/Tour/ready-to-go.svg"
,
gettext
(
"That's it. Have a nice day!"
),
...
...
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