Add margin and fix the fonts

This commit is contained in:
bad 2022-05-17 21:10:52 +02:00
parent 083c0ea5c4
commit e915b0bf0d
3 changed files with 20 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -9,6 +9,9 @@
id="svg5" id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="activate_linux.svg" sodipodi:docname="activate_linux.svg"
inkscape:export-filename="/home/mae/activate-linux-wayland/activate_linux.png"
inkscape:export-xdpi="98.304001"
inkscape:export-ydpi="98.304001"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -23,15 +26,16 @@
inkscape:pagecheckerboard="0" inkscape:pagecheckerboard="0"
inkscape:document-units="mm" inkscape:document-units="mm"
showgrid="false" showgrid="false"
inkscape:zoom="0.64765011" inkscape:zoom="1"
inkscape:cx="8.4922397" inkscape:cx="438"
inkscape:cy="561.25984" inkscape:cy="437"
inkscape:window-width="1916" inkscape:window-width="1916"
inkscape:window-height="1057" inkscape:window-height="1037"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="0" inkscape:window-y="0"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:current-layer="layer1" /> inkscape:current-layer="layer1"
inkscape:snap-text-baseline="false" />
<defs <defs
id="defs2"> id="defs2">
<rect <rect
@ -49,9 +53,15 @@
xml:space="preserve" xml:space="preserve"
transform="matrix(0.26458333,0,0,0.26458333,28.54782,45.852003)" transform="matrix(0.26458333,0,0,0.26458333,28.54782,45.852003)"
id="text2737" id="text2737"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2739);fill:#000000;fill-opacity:0.3051948;stroke:none"><tspan style="font-style:normal;font-weight:normal;font-size:32px;line-height:1;font-family:sans-serif;white-space:pre;shape-inside:url(#rect2739);fill:#000000;fill-opacity:0.5;stroke:none"><tspan
x="152.85938" x="152.85938"
y="402.87305" y="391.79492"
id="tspan16189">Activate Linux</tspan></text> id="tspan30188">Activate Linux
</tspan><tspan
x="152.85938"
y="423.79492"
id="tspan30192"><tspan
style="font-size:20px"
id="tspan30190">Go to Settings to activate Linux</tspan>.</tspan></text>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -68,6 +68,7 @@ impl Surface {
compositor: &Attached<WlCompositor>, compositor: &Attached<WlCompositor>,
) -> Self { ) -> Self {
let (info, png) = load_activate_png(); let (info, png) = load_activate_png();
let layer_surface = layer_shell.get_layer_surface( let layer_surface = layer_shell.get_layer_surface(
&surface, &surface,
Some(output), Some(output),
@ -75,6 +76,7 @@ impl Surface {
"example".to_owned(), "example".to_owned(),
); );
layer_surface.set_keyboard_interactivity(KeyboardInteractivity::None); layer_surface.set_keyboard_interactivity(KeyboardInteractivity::None);
layer_surface.set_margin(0,40,40,0);
layer_surface.set_size(info.width, info.height); layer_surface.set_size(info.width, info.height);
// Anchor to the top left corner of the output // Anchor to the top left corner of the output