new plymouth theme: MOS

master
DSLitvinov 2 years ago
parent 8c70ffd25a
commit a3696d78e2
  1. BIN
      branding-mos-school/components/bootsplash/boot16x9.png
  2. BIN
      branding-mos-school/components/bootsplash/boot4x3.png
  3. 0
      branding-mos-school/components/bootsplash/box.png
  4. BIN
      branding-mos-school/components/bootsplash/bullet.png
  5. 49
      branding-mos-school/components/bootsplash/bullet.svg
  6. 0
      branding-mos-school/components/bootsplash/entry.png
  7. BIN
      branding-mos-school/components/bootsplash/lock.png
  8. 53
      branding-mos-school/components/bootsplash/lock.svg
  9. 9
      branding-mos-school/components/bootsplash/mos.plymouth
  10. 169
      branding-mos-school/components/bootsplash/mos.script
  11. BIN
      branding-mos-school/components/bootsplash/progress_bar.png
  12. BIN
      branding-mos-school/components/bootsplash/progress_box.png
  13. BIN
      branding-mos-school/components/bootsplash/segment_cornerL.png
  14. BIN
      branding-mos-school/components/bootsplash/segment_cornerR.png
  15. BIN
      branding-mos-school/components/bootsplash/segment_middle.png
  16. BIN
      branding-mos-school/components/bootsplash/segment_status.png
  17. BIN
      branding-mos-school/components/bootsplash/shutdown16x9.png
  18. BIN
      branding-mos-school/components/bootsplash/shutdown4x3.png
  19. 8
      branding-mos-school/components/bootsplash/theme.plymouth.in
  20. BIN
      branding-mos-school/images/background16x9.png
  21. BIN
      branding-mos-school/images/background4x3.png
  22. BIN
      branding-mos-school/images/boot16x9.png
  23. BIN
      branding-mos-school/images/boot4x3.png
  24. BIN
      branding-mos-school/images/shutdown16x9.png
  25. BIN
      branding-mos-school/images/shutdown4x3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 242 B

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="7"
height="7"
viewBox="0 0 1.8520833 1.8520833"
version="1.1"
id="svg5"
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
sodipodi:docname="bullet.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="45.254834"
inkscape:cx="5.2591067"
inkscape:cy="4.4194174"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:#4c6ef5;fill-opacity:1;stroke:none;stroke-width:1.75033"
id="path236"
cx="0.92604166"
cy="0.92604166"
r="0.79374999" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 350 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 613 B

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="44"
height="44"
viewBox="0 0 11.641666 11.641667"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2 (1:1.2.1+202207142221+cd75a1ee6d)"
sodipodi:docname="lock.svg"
inkscape:export-filename="lock.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="24.316722"
inkscape:cx="22.782676"
inkscape:cy="24.222015"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2" /><g
inkscape:label="Слой 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:#ffffff;stroke-width:26.4583"
id="rect354"
width="7.5671072"
height="5.9816194"
x="2.0372798"
y="4.9993453"
ry="0.37841314" /><path
style="fill:none;stroke:#fefefe;stroke-width:1;stroke-dasharray:none;stroke-opacity:1"
d="m 3.1810624,5.5285122 0.010156,-2.3296573 c 0.010733,-2.46197711 5.2426785,-2.46196141 5.2535092,0.00452 l 0.01021,2.3251373"
id="path412"
sodipodi:nodetypes="cssc" /></g></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,9 @@
[Plymouth Theme]
Name=MOS
Description=MOS Plymouth theme.
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/mos
ScriptFile=/usr/share/plymouth/themes/mos/mos.script
UseFirmwareBackground=false

@ -1,32 +1,93 @@
# Centaurus theme # background
fun imglogo( image, scaleX, scaleY )
fun imgscale( image, scale )
{ {
image.Scale( image.GetWidth() * scale, image.GetHeight() * scale ); image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY );
} }
fun imgscale2( image, scaleX, scaleY ) #----------------------------------------- Ptogress Bar __________________________
#Boot
if (Plymouth.GetMode () == "boot")
{ {
image.Scale( image.GetWidth() * scaleX, image.GetHeight() * scaleY );
# background
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{
logo.raw = Image("boot16x9.png");
}
else
{
logo.raw = Image("boot4x3.png");
}
logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
progress_box.image = Image("progress_box.png");
progress_box.sprite = Sprite(progress_box.image);
progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
#change here
progress_box.y = Window.GetY() + Window.GetHeight() * 0.65 - progress_box.image.GetHeight() / 2;
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
progress_bar.original_image = Image("progress_bar.png");
progress_bar.sprite = Sprite();
progress_bar.x = Window.GetX() + Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2;
#change here
progress_bar.y = Window.GetY() + Window.GetHeight() / 2 * 1.3 - progress_box.image.GetHeight() / 2 + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2;
progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1);
fun progress_callback (duration, progress)
{
if (progress_bar.image.GetWidth () != Math.Int (progress_bar.original_image.GetWidth () * progress))
{
progress_bar.image = progress_bar.original_image.Scale(progress_bar.original_image.GetWidth(progress_bar.original_image) * progress, progress_bar.original_image.GetHeight());
progress_bar.sprite.SetImage (progress_bar.image);
}
}
Plymouth.SetBootProgressFunction(progress_callback);
} }
# background if (Plymouth.GetMode () == "shutdown")
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{ {
logo.raw = Image("background16x9.png");
# background
if( Window.GetWidth()/Window.GetHeight() > 1.5 )
{
logo.raw = Image("shutdown16x9.png");
}
else
{
logo.raw = Image("shutdown4x3.png");
}
logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
} }
else if (Plymouth.GetMode () == "reboot")
{ {
logo.raw = Image("background4x3.png");
}
logo.image = imgscale2( logo.raw, # background
Window.GetWidth()/logo.raw.GetWidth(), if( Window.GetWidth()/Window.GetHeight() > 1.5 )
Window.GetHeight()/logo.raw.GetHeight()); {
logo.sprite = Sprite(logo.image); logo.raw = Image("shutdown16x9.png");
logo.sprite.SetPosition(0, 0, 0); }
else
{
logo.raw = Image("shutdown4x3.png");
}
logo.image = imglogo( logo.raw, Window.GetWidth()/logo.raw.GetWidth(), Window.GetHeight()/logo.raw.GetHeight());
logo.sprite = Sprite(logo.image);
logo.sprite.SetPosition(0, 0, 0);
#----------------------------------------- Dialogue -------------------------------- }
#----------------------------------------- Dialog --------------------------------
status = "normal"; status = "normal";
@ -35,36 +96,36 @@ fun dialog_setup()
local.box; local.box;
local.lock; local.lock;
local.entry; local.entry;
box.image = Image("box.png"); box.image = Image("box.png");
lock.image = Image("lock.png"); lock.image = Image("lock.png");
entry.image = Image("entry.png"); entry.image = Image("entry.png");
box.sprite = Sprite(box.image); box.sprite = Sprite(box.image);
box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth ()/2; box.x = Window.GetX() + Window.GetWidth() / 2 - box.image.GetWidth ()/2;
box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2; box.y = Window.GetY() + Window.GetHeight() / 2 - box.image.GetHeight()/2;
box.z = 10000; box.z = 10000;
box.sprite.SetPosition(box.x, box.y, box.z); box.sprite.SetPosition(box.x, box.y, box.z);
lock.sprite = Sprite(lock.image); lock.sprite = Sprite(lock.image);
lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2; lock.x = box.x + box.image.GetWidth()/2 - (lock.image.GetWidth() + entry.image.GetWidth()) / 2;
lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2; lock.y = box.y + box.image.GetHeight()/2 - lock.image.GetHeight()/2;
lock.z = box.z + 1; lock.z = box.z + 1;
lock.sprite.SetPosition(lock.x, lock.y, lock.z); lock.sprite.SetPosition(lock.x, lock.y, lock.z);
entry.sprite = Sprite(entry.image); entry.sprite = Sprite(entry.image);
entry.x = lock.x + lock.image.GetWidth(); entry.x = lock.x + lock.image.GetWidth();
entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2; entry.y = box.y + box.image.GetHeight()/2 - entry.image.GetHeight()/2;
entry.z = box.z + 1; entry.z = box.z + 1;
entry.sprite.SetPosition(entry.x, entry.y, entry.z); entry.sprite.SetPosition(entry.x, entry.y, entry.z);
global.dialog.box = box; global.dialog.box = box;
global.dialog.lock = lock; global.dialog.lock = lock;
global.dialog.entry = entry; global.dialog.entry = entry;
global.dialog.bullet_image = Image("bullet.png"); global.dialog.bullet_image = Image("bullet.png");
dialog_opacity (1); dialog_opacity (1);
} }
fun dialog_opacity(opacity) fun dialog_opacity(opacity)
{ {
dialog.box.sprite.SetOpacity (opacity); dialog.box.sprite.SetOpacity (opacity);
@ -110,65 +171,6 @@ 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 --------------------------------
progress_box.raw = Image("progress_box.png");
scale_factor = Window.GetWidth() / progress_box.raw.GetWidth() * 0.8;
progress_box.image = imgscale( progress_box.raw, scale_factor );
progress_box.sprite = Sprite(progress_box.image);
progress_box.x = Window.GetX() + Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
progress_box.y = Window.GetY() + Window.GetHeight() / 2 - progress_box.image.GetHeight() / 2;
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;
#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)
{
for( i=0; i< progress*steps; i++ )
progress_bar.sprites[i].SetZ(2);
if( progress > 0.99 )
progress_bar.sprites[i+1].SetZ(2);
if( progress < 0.96 )
progress_bar.runner.SetPosition(progress_bar.x+progress*step*steps, progress_bar.y, 1);
}
Plymouth.SetBootProgressFunction(progress_callback);
#----------------------------------------- Quit -------------------------------- #----------------------------------------- Quit --------------------------------
fun quit_callback () fun quit_callback ()
@ -205,3 +207,4 @@ fun hide_message_callback (text)
Plymouth.SetDisplayMessageFunction (display_message_callback); Plymouth.SetDisplayMessageFunction (display_message_callback);
Plymouth.SetHideMessageFunction (hide_message_callback); Plymouth.SetHideMessageFunction (hide_message_callback);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

@ -1,8 +0,0 @@
[Plymouth Theme]
Name=@NAME@
Description=Script for @BRAND_FNAME@ @NAME@
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/@THEME@
ScriptFile=/usr/share/plymouth/themes/@THEME@/theme.script

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Loading…
Cancel
Save