Skip to content

Commit d34622f

Browse files
committed
Attached menu button, accessibility optimization
1 parent db22193 commit d34622f

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

Protest/Front/ui.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,25 @@
5757

5858
#attachedmenubutton {
5959
position: absolute;
60-
left: 4px;
61-
top: 4px;
62-
width: 48px;
63-
height: 48px;
64-
background-image: url(mono/logo.svg);
65-
background-size: 55% 55%;
66-
background-position: center;
67-
background-repeat: no-repeat;
68-
border-radius: 48%;
60+
left: 0;
61+
top: 0;
62+
width: 56px;
63+
height: 56px;
64+
65+
background:
66+
url(mono/logo.svg),
67+
radial-gradient(circle, transparent 52%, var(--clr-dark) 56%, var(--clr-dark) 60%, transparent 64%);
68+
69+
background-size: 46% 46%, 100% 100%;
70+
background-position: center, center;
71+
background-repeat: no-repeat, no-repeat;
72+
border-radius: 50%;
6973

70-
transform: scaleY(0%);
7174
transform-origin: 50% 50%;
7275
transition: .2s;
7376
}
7477

7578
#attachedmenubutton:active {
76-
filter: brightness(0%);
7779
background-color: rgba(32,32,32,.1);
7880
}
7981

Protest/Front/ui.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ const MENU = {
491491
menubutton.style.visibility = "hidden";
492492

493493
attachedmenubutton.style.transform = "none";
494-
attachedmenubutton.style.boxShadow = "#202020 0 0 0 3px inset";
495494

496495
switch (UI.taskbarPosition) {
497496
case "top":
@@ -541,8 +540,6 @@ const MENU = {
541540
default: attachedmenubutton.style.transform = "scaleY(0)"; break;
542541
}
543542

544-
attachedmenubutton.style.boxShadow = "none";
545-
546543
if (MENU.isAttached) {
547544
MENU.isAttached = false;
548545
WIN.AlignIcon();
@@ -858,7 +855,6 @@ const MENU = {
858855
menufilterdot.style.left = `${menufilter.offsetLeft + Math.max(index, 0) * 40 + 1}px`;
859856
MENU.filterIndex = index;
860857
}
861-
862858
MENU.Update(searchinput.value);
863859
},
864860

Protest/Front/window.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ const WIN = {
5050
}
5151

5252
if (MENU.isAttached) {
53-
attachedmenubutton.style.width = `${WIN.iconSize - 8}px`;
54-
attachedmenubutton.style.height = `${WIN.iconSize - 8}px`;
53+
attachedmenubutton.style.width = `${WIN.iconSize}px`;
54+
attachedmenubutton.style.height = `${WIN.iconSize}px`;
5555
}
5656

5757
for (let i = 0; i < WIN.array.length; i++) {
@@ -1047,11 +1047,11 @@ class Window {
10471047
okButton.onclick = event=> cancelButton.onclick(event);
10481048

10491049
return {
1050-
okButton: okButton,
1050+
okButton : okButton,
10511051
cancelButton: cancelButton,
1052-
innerBox: innerBox,
1053-
buttonBox: buttonBox,
1054-
Close: Close
1052+
innerBox : innerBox,
1053+
buttonBox : buttonBox,
1054+
Close : Close
10551055
};
10561056
}
10571057

0 commit comments

Comments
 (0)