Skip to content

Commit 9a24d36

Browse files
enhance file menu styles with new focus and unfocus background colors
1 parent ad0e70c commit 9a24d36

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default class clusterPlugin extends Plugin {
77
settings: clusterPluginSettings;
88

99
async onload() {
10-
console.log("loading Cluster sdfsdf plugin");
10+
console.log("loading Cluster plugin");
1111
const file = this.app.workspace.getActiveFile() as TFile;
1212

1313
await this.loadSettings();

src/mainParts/fileMenu.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export function fileMenu(plugin: Plugin, SimpleFocus: SimpleFocusClass) {
2828
||
2929
(file instanceof TFolder && file.path.startsWith(clusters) && file.path.endsWith(clusters))
3030
) {
31-
menu.addSeparator()
3231
menu.addItem((item) => {
3332
item
3433
.setTitle("New cluster")
@@ -42,7 +41,6 @@ export function fileMenu(plugin: Plugin, SimpleFocus: SimpleFocusClass) {
4241
}
4342
//- Child menu
4443
if (file instanceof TFile && file.path.startsWith(clusters)) {
45-
menu.addSeparator()
4644
menu.addItem((item) => {
4745
item
4846
.setTitle("New Child")

src/style/parts/file-menu.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//-FILE MENU -------------------*/
22
.menu-item:has(.menu-item-icon .lucide-folder-git-2) {
33
background-color: var(--background-menu-cluster);
4+
margin-bottom: 2px;
45
}
56

67
.menu-item.selected:has(.menu-item-icon .lucide-folder-git-2) {
@@ -30,4 +31,22 @@
3031

3132
.menu-item.selected:has(.menu-item-icon .lucide-disc) {
3233
background-color: var(--background-menu-orphan-selected);
34+
}
35+
36+
.menu-item:has(.menu-item-icon .lucide-focus) {
37+
background-color: var(--background-menu-focus);
38+
margin-bottom: 2px;
39+
}
40+
41+
.menu-item.selected:has(.menu-item-icon .lucide-focus) {
42+
background-color: var(--background-menu-focus-selected);
43+
}
44+
45+
.menu-item:has(.menu-item-icon .lucide-log-out) {
46+
background-color: var(--background-menu-un-focus);
47+
margin-bottom: 2px;
48+
}
49+
50+
.menu-item.selected:has(.menu-item-icon .lucide-log-out) {
51+
background-color: var(--background-menu-un-focus-selected);
3352
}

src/style/parts/variables.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
--background-menu-sibling-selected: hsl(210deg 50% 30% / 80%) !important;
1818
--background-menu-orphan: hsl(303deg 50% 30%/ 40%) !important;
1919
--background-menu-orphan-selected: hsl(303deg 50% 30%/ 80%) !important;
20+
--background-menu-focus: hsl(130deg 50% 30%/ 40%) !important;
21+
--background-menu-focus-selected: hsl(130deg 50% 30%/ 80%) !important;
22+
--background-menu-un-focus: hsl(60deg 50% 30%/ 40%) !important;
23+
--background-menu-un-focus-selected: hsl(60deg 50% 30%/ 80%) !important;
2024
//- buttons container colors
2125
--background-button-container-clusters: hsl(220deg 50% 30% / 30%);
2226
--background-button-container-orphans: hsl(303deg 50% 30%/ 30%);
@@ -53,6 +57,10 @@
5357
--background-menu-sibling-selected: hsl(210deg 50% 30% / 80%) !important;
5458
--background-menu-orphan: hsl(303deg 50% 30%/ 40%) !important;
5559
--background-menu-orphan-selected: hsl(303deg 50% 30%/ 80%) !important;
60+
--background-menu-focus: hsl(130deg 50% 30%/ 40%) !important;
61+
--background-menu-focus-selected: hsl(130deg 50% 30%/ 80%) !important;
62+
--background-menu-un-focus: hsl(60deg 50% 30%/ 40%) !important;
63+
--background-menu-un-focus-selected: hsl(60deg 50% 30%/ 80%) !important;
5664
//- buttons container colors
5765
--background-button-container-clusters: hsl(220deg 30% 50%);
5866
--background-button-container-orphans: hsl(303deg 30% 50%);

styles.css

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)