Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
branding-etersoft-ximper
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
branding-etersoft-ximper
Commits
3e7dfee2
Commit
3e7dfee2
authored
May 27, 2019
by
Andrey Cherepanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize plymouth theme
parent
59d7ccf6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
50 deletions
+28
-50
progress_bar.png
bootsplash/progress_bar.png
+0
-0
progress_bg.png
bootsplash/progress_bg.png
+0
-0
progress_box.png
bootsplash/progress_box.png
+0
-0
segment_cornerL.png
bootsplash/segment_cornerL.png
+0
-0
segment_cornerR.png
bootsplash/segment_cornerR.png
+0
-0
segment_middle.png
bootsplash/segment_middle.png
+0
-0
segment_status.png
bootsplash/segment_status.png
+0
-0
theme.script
bootsplash/theme.script
+28
-50
No files found.
bootsplash/progress_bar.png
View replaced file @
59d7ccf6
View file @
3e7dfee2
173 Bytes
|
W:
|
H:
261 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
bootsplash/progress_bg.png
0 → 100644
View file @
3e7dfee2
150 Bytes
bootsplash/progress_box.png
deleted
100644 → 0
View file @
59d7ccf6
7.37 KB
bootsplash/segment_cornerL.png
deleted
100644 → 0
View file @
59d7ccf6
4.4 KB
bootsplash/segment_cornerR.png
deleted
100644 → 0
View file @
59d7ccf6
4.5 KB
bootsplash/segment_middle.png
deleted
100644 → 0
View file @
59d7ccf6
3.41 KB
bootsplash/segment_status.png
deleted
100644 → 0
View file @
59d7ccf6
3.3 KB
bootsplash/theme.script
View file @
3e7dfee2
#
Centaurus t
heme
#
ALT Education T
heme
fun imgscale( image, scale )
fun imgscale( image, scale )
{
{
...
@@ -110,61 +110,39 @@ fun display_password_callback (prompt, bullets)
...
@@ -110,61 +110,39 @@ fun display_password_callback (prompt, bullets)
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
#-------------------------------------
---- Progress Bar ---
-----------------------------
#-------------------------------------
Progressbar
-----------------------------
progress_box.raw = Image("progress_box.png");
# Define bar size and position
scale_factor = Window.GetWidth() / progress_box.raw.GetWidth() * 0.8;
bar_height = 36;
bar_x = Window.GetWidth() * 0.10; # 10% from left edge
bar_y = Window.GetHeight() * 0.85; # from bar bottom to bottom screen edge: 10%
bar_width = Window.GetWidth() * 0.80; # 80% of screen width
progress_box.image = imgscale( progress_box.raw, scale_factor );
# Progress background spite
progress_bg.raw = Image ("progress_bg.png");
progress_bg.image = imgscale2 (progress_bg.raw, bar_width, bar_height);
progress_bg.sprite = Sprite (progress_bg.image);
progress_bg.sprite.SetPosition (bar_x, bar_y);
progress_bg.sprite.SetZ (5);
progress_box.sprite = Sprite(progress_box.image);
# Progress bar sprite
progress_bar.raw = Image ("progress_bar.png");
progress_bar.image = imgscale (progress_bar.raw, 1);
progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
# Maximum number of sprites
progress_box.y = Window.GetY() + Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2 + 50;
steps = Math.Int (bar_width/18);
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
progress_bar.status.raw = Image("segment_status.png");
progress_bar.runner = Sprite();
progress_bar.runner.SetImage ( imgscale(progress_bar.status.raw, scale_factor));
progress_bar.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
progress_bar.y = Window.GetY() + Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2 +
(progress_box.image.GetHeight() - progress_box.image.GetHeight()) / 2 + 50;
#Total steps
steps=33;
#left corner
progress_bar.l = imgscale( Image("segment_cornerL.png") , scale_factor );
progress_bar.spriteL = Sprite();
progress_bar.spriteL.SetImage (progress_bar.l);
progress_bar.spriteL.SetPosition(progress_bar.x,progress_bar.y, 2) ;
progress_bar.x += progress_bar.l.GetWidth()-1;
#middle
progress_bar.image = imgscale(Image("segment_middle.png"), scale_factor);
step = progress_bar.image.GetWidth()-1;
for( i=0; i<steps; i++ )
{
progress_bar.sprites[i] = Sprite();
progress_bar.sprites[i].SetImage (progress_bar.image);
progress_bar.sprites[i].SetPosition(progress_bar.x+i*step,progress_bar.y, -1000) ;
}
#right corner
progress_bar.r = imgscale( Image("segment_cornerR.png") , scale_factor );
progress_bar.sprites[steps+1] = Sprite();
progress_bar.sprites[steps+1].SetImage (progress_bar.r);
progress_bar.sprites[steps+1].SetPosition(progress_bar.x+step*steps,progress_bar.y, -1000) ;
fun progress_callback (duration, progress)
fun progress_callback (duration, progress)
{
{
for( i=0; i< progress*steps; i++ )
# Redraw progress_bar with appropriate width with step 20% with 5% ahead
progress_bar.sprites[i].SetZ(2);
step = Math.Int ((progress+0.05) / steps) + 1;
if( progress > 0.99 )
if ( step > steps ) step = steps;
progress_bar.sprites[i+1].SetZ(2);
for( i=0; i<step; i++ )
if( progress < 0.96 )
progress_bar.sprites[i] = Sprite ();
progress_bar.runner.SetPosition(progress_bar.x+progress*step*steps, progress_bar.y, 1);
progress_bar.sprites[i].SetImage (progress_bar.image);
progress_bar.sprites[i].SetPosition (bar_x+i*18, bar_y);
progress_bar.sprites[i].SetZ (10);
}
}
}
Plymouth.SetBootProgressFunction(progress_callback);
Plymouth.SetBootProgressFunction(progress_callback);
...
@@ -173,7 +151,7 @@ Plymouth.SetBootProgressFunction(progress_callback);
...
@@ -173,7 +151,7 @@ Plymouth.SetBootProgressFunction(progress_callback);
fun quit_callback ()
fun quit_callback ()
{
{
logo.sprite.SetOpacity (
1
);
logo.sprite.SetOpacity (
0
);
}
}
Plymouth.SetQuitFunction(quit_callback);
Plymouth.SetQuitFunction(quit_callback);
...
...
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