Skip to content

Commit f1d0acb

Browse files
committed
fix: improve hot corner styles
1 parent 02a1e11 commit f1d0acb

File tree

2 files changed

+28
-55
lines changed

2 files changed

+28
-55
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3645,17 +3645,14 @@ function RemoteFunctions(config = {}) {
36453645

36463646
const content = `
36473647
<div class="phoenix-hot-corner">
3648-
<div class="hot-corner-indicator"></div>
3649-
<div class="hot-corner-box">
3650-
<button class="hot-corner-play-btn"> ${icons.playButton} </button>
3651-
</div>
3648+
<button class="hot-corner-btn">${icons.playButton}</button>
36523649
</div>`;
36533650

36543651
shadow.innerHTML = `<style>${cssStyles.hotCorner}</style>${content}`;
36553652

36563653
this.element = container;
3657-
this.button = shadow.querySelector(".hot-corner-play-btn");
3658-
this.box = shadow.querySelector(".hot-corner-box");
3654+
this.button = shadow.querySelector(".hot-corner-btn");
3655+
this.hotCorner = shadow.querySelector(".phoenix-hot-corner");
36593656

36603657
this.button.addEventListener("click", () => {
36613658
window._Brackets_MessageBroker.send({ livePreviewEditEnabled: true, type: "hotCornerPreviewToggle" });
@@ -3668,12 +3665,12 @@ function RemoteFunctions(config = {}) {
36683665
if (isPreviewMode) {
36693666
this.button.classList.add("selected");
36703667

3671-
if (!this.wasPreviewMode && showAnimation && this.box) {
3672-
this.box.classList.add("peek-animation");
3668+
if (!this.wasPreviewMode && showAnimation && this.hotCorner) {
3669+
this.hotCorner.classList.add("peek-animation");
36733670

36743671
setTimeout(() => {
3675-
if (this.box) {
3676-
this.box.classList.remove("peek-animation");
3672+
if (this.hotCorner) {
3673+
this.hotCorner.classList.remove("peek-animation");
36773674
}
36783675
}, 1200);
36793676
}
@@ -3689,7 +3686,7 @@ function RemoteFunctions(config = {}) {
36893686
}
36903687
this.element = null;
36913688
this.button = null;
3692-
this.box = null;
3689+
this.hotCorner = null;
36933690
}
36943691
}
36953692

src/extensionsIntegrated/phoenix-pro/browser-css/hot-corners.css

Lines changed: 20 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,70 +4,46 @@
44

55
.phoenix-hot-corner {
66
position: fixed !important;
7-
top: 0 !important;
7+
top: -35px !important;
88
left: 50% !important;
99
transform: translateX(-50%) !important;
10-
z-index: 2147483646 !important;
11-
pointer-events: none !important;
12-
}
13-
14-
.hot-corner-indicator {
1510
width: 70px !important;
16-
height: 5px !important;
17-
background-color: rgba(160, 160, 160, 0.4) !important;
18-
border-radius: 0 0 3px 3px !important;
19-
margin: 0 auto !important;
20-
pointer-events: auto !important;
21-
}
22-
23-
.hot-corner-box {
24-
position: absolute !important;
25-
top: 0 !important;
26-
left: 50% !important;
27-
transform: translateX(-50%) translateY(-100%) !important;
28-
width: 36px !important;
29-
height: 28px !important;
11+
height: 40px !important;
3012
background-color: rgba(60, 63, 65, 0.95) !important;
31-
border-radius: 0 0 6px 6px !important;
13+
border-radius: 0 0 8px 8px !important;
3214
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
3315
display: flex !important;
3416
align-items: center !important;
3517
justify-content: center !important;
36-
opacity: 0 !important;
37-
transition: transform 0.3s ease-out, opacity 0.3s ease-out !important;
38-
pointer-events: auto !important;
18+
z-index: 2147483646 !important;
19+
transition: top 0.3s ease-out !important;
20+
cursor: pointer !important;
3921
}
4022

41-
.phoenix-hot-corner:hover .hot-corner-box {
42-
transform: translateX(-50%) translateY(0) !important;
43-
opacity: 1 !important;
23+
.phoenix-hot-corner:hover {
24+
top: 0 !important;
4425
}
4526

46-
.hot-corner-box.peek-animation {
27+
.phoenix-hot-corner.peek-animation {
4728
animation: peekDown 1.2s ease-in-out !important;
48-
transition: none !important;
4929
}
5030

5131
@keyframes peekDown {
5232
0% {
53-
transform: translateX(-50%) translateY(-100%);
54-
opacity: 0;
33+
top: -35px;
5534
}
5635
25% {
57-
transform: translateX(-50%) translateY(0);
58-
opacity: 1;
36+
top: 0;
5937
}
6038
75% {
61-
transform: translateX(-50%) translateY(0);
62-
opacity: 1;
39+
top: 0;
6340
}
6441
100% {
65-
transform: translateX(-50%) translateY(-100%);
66-
opacity: 0;
42+
top: -35px;
6743
}
6844
}
6945

70-
.hot-corner-play-btn {
46+
.hot-corner-btn {
7147
background-color: transparent !important;
7248
border: none !important;
7349
color: #a0a0a0 !important;
@@ -82,19 +58,19 @@
8258
padding: 0 !important;
8359
}
8460

85-
.hot-corner-play-btn:hover {
61+
.hot-corner-btn:hover {
8662
color: #c0c0c0 !important;
8763
}
8864

89-
.hot-corner-play-btn.selected {
65+
.hot-corner-btn.selected {
9066
color: #FBB03B !important;
9167
}
9268

93-
.hot-corner-play-btn.selected:hover {
69+
.hot-corner-btn.selected:hover {
9470
color: #FCC04B !important;
9571
}
9672

97-
.hot-corner-play-btn svg {
98-
width: 18px !important;
99-
height: 18px !important;
73+
.hot-corner-btn svg {
74+
width: 22px !important;
75+
height: 22px !important;
10076
}

0 commit comments

Comments
 (0)