From 9d550310e822c417f87a48fd2afda5134b67027b Mon Sep 17 00:00:00 2001 From: revenmartin Date: Sat, 22 May 2021 11:05:01 +0800 Subject: [PATCH] Update --- .../images/dark/minimize_normal.svg | 14 ++++----- .../images/light/maximize_normal.svg | 10 +++---- .../images/light/minimize_normal.svg | 14 ++++----- scripts/cutefishlauncher/contents/main.js | 30 ++----------------- 4 files changed, 21 insertions(+), 47 deletions(-) diff --git a/plugins/decoration/images/dark/minimize_normal.svg b/plugins/decoration/images/dark/minimize_normal.svg index 22f463d..2cae8fd 100644 --- a/plugins/decoration/images/dark/minimize_normal.svg +++ b/plugins/decoration/images/dark/minimize_normal.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="minimize.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" + sodipodi:docname="minimize_normal.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15)" id="svg8" version="1.1" viewBox="0 0 7.9374997 7.9375002" @@ -20,9 +20,9 @@ inkscape:document-rotation="0" inkscape:pagecheckerboard="false" inkscape:window-maximized="1" - inkscape:window-y="0" + inkscape:window-y="42" inkscape:window-x="0" - inkscape:window-height="1304" + inkscape:window-height="1233" inkscape:window-width="2160" units="px" showgrid="false" @@ -70,9 +70,9 @@ id="4-7" /> + transform="matrix(0.36896569,0,0,0.33072917,-3.4105638,286.58201)" + style="fill:#cacbce;fill-opacity:1" /> diff --git a/plugins/decoration/images/light/maximize_normal.svg b/plugins/decoration/images/light/maximize_normal.svg index a892d59..c6fecb1 100644 --- a/plugins/decoration/images/light/maximize_normal.svg +++ b/plugins/decoration/images/light/maximize_normal.svg @@ -8,8 +8,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="maximize.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" + sodipodi:docname="maximize_normal.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15)" id="svg8" version="1.1" viewBox="0 0 7.9374997 7.9375002" @@ -30,9 +30,9 @@ inkscape:document-rotation="0" inkscape:pagecheckerboard="false" inkscape:window-maximized="1" - inkscape:window-y="0" + inkscape:window-y="42" inkscape:window-x="0" - inkscape:window-height="1304" + inkscape:window-height="1226" inkscape:window-width="2160" units="px" showgrid="false" @@ -87,7 +87,7 @@ y="294.87387" ry="4.4795979e-06" /> + transform="matrix(0.36896569,0,0,0.33072917,-3.4105638,286.58201)" + style="opacity:1;fill:#383838;fill-opacity:1" /> diff --git a/scripts/cutefishlauncher/contents/main.js b/scripts/cutefishlauncher/contents/main.js index 49c7bc1..46073d0 100644 --- a/scripts/cutefishlauncher/contents/main.js +++ b/scripts/cutefishlauncher/contents/main.js @@ -1,33 +1,7 @@ -function rectContains(rect1, rect2) { - rect1.right = rect1.x + rect1.width - 1; - rect1.bottom = rect1.y + rect1.height - 1; - rect2.right = rect2.x + rect2.width - 1; - rect2.bottom = rect2.y + rect2.height - 1; - - if (rect1.x != rect2.x) - return false; - if (rect1.y != rect2.y) - return false; - if (rect1.right != rect2.right) - return false; - if (rect1.bottom != rect2.bottom) - return false; - - return true; -} - function forceFullScreen(client) { - var newGeometry = client.geometry; var screen = client.screen; var screenGeometry = workspace.clientArea(KWin.ScreenArea, screen, 0); - - if (!rectContains(screenGeometry, newGeometry)) { - newGeometry.x = screenGeometry.x; - newGeometry.y = screenGeometry.y; - newGeometry.width = screenGeometry.width; - newGeometry.height = screenGeometry.height; - client.geometry = newGeometry; - } + client.geometry = screenGeometry; } function setupConnection(client) { @@ -45,6 +19,6 @@ function setupConnection(client) { workspace.clientAdded.connect(setupConnection); // connect all existing clients var clients = workspace.clientList(); -for (var i=0; i