Skip to content

Commit 9e67dfb

Browse files
committed
some solid cleanup
1 parent b0d47f7 commit 9e67dfb

File tree

10 files changed

+477
-252
lines changed

10 files changed

+477
-252
lines changed

data/Application.css

Lines changed: 89 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
* SPDX-FileCopyrightText: 2025 Stella, whose hairs are shiny and soft. (https://teamcons.carrd.co)
44
*/
55

6-
76
@define-color textColorPrimary #323232;
87

8+
@define-color MainColor @BLUEBERRY_100;
9+
@define-color SecondaryColor @BLUEBERRY_900;
910

1011
/* TODO : These only exist to colour the "pills" to select theme. This needs a fixing */
11-
12-
1312
.color-strawberry {
1413
background-color: @STRAWBERRY_100;
1514
}
@@ -48,14 +47,96 @@
4847

4948

5049

51-
/* Idk wth this is */
50+
51+
52+
/* These are the colored pills to select theme */
53+
.color-button {
54+
border-radius: 50%;
55+
background-image: none;
56+
border: 1px solid alpha(#333, 0.25);
57+
box-shadow:
58+
inset 0 1px 0 0 alpha (@inset_dark_color, 0.7),
59+
inset 0 0 0 1px alpha (@inset_dark_color, 0.3),
60+
0 1px 0 0 alpha (@bg_highlight_color, 0.3);
61+
}
62+
63+
.color-button:hover,
64+
.color_button:focus {
65+
border: 1px solid @inset_dark_color;
66+
}
67+
68+
69+
.window {
70+
background-color: @MainColor;
71+
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
72+
}
73+
74+
.window undershoot.top {
75+
background:
76+
linear-gradient(
77+
@MainColor 0%,
78+
alpha(@MainColor, 0) 50%
79+
);
80+
}
81+
82+
.window undershoot.bottom {
83+
background:
84+
linear-gradient(
85+
alpha(@MainColor, 0) 50%,
86+
@MainColor 100%
87+
);
88+
}
89+
90+
.jorts-view text selection {
91+
color: shade(@MainColor, 1.88);
92+
background-color: @SecondaryColor;
93+
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
94+
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
95+
}
96+
5297
entry.flat {
5398
background: transparent;
5499
}
55100

101+
.window .jorts-title image,
102+
.window .jorts-label {
103+
color: @SecondaryColor;
104+
box-shadow: none;
105+
}
106+
107+
.window .jorts-bar {
108+
color: @SecondaryColor;
109+
background-color: @MainColor;
110+
border-top-color: @SecondaryColor;
111+
box-shadow: none;
112+
background-image: none;
113+
padding: 3px;
114+
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
115+
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
116+
}
117+
118+
.window .jorts-bar image {
119+
color: @SecondaryColor;
120+
padding: 3px;
121+
box-shadow: none;
122+
background-image: none;
123+
}
124+
125+
.window .jorts-view,
126+
.window .jorts-view text,
127+
.window .jorts-title {
128+
background-color: @MainColor;
129+
background-image: none;
130+
border-bottom-color: @SecondaryColor;
131+
font-weight: 500;
132+
font-size: 1.2em;
133+
color: shade(@SecondaryColor, 0.77);
134+
box-shadow: none;
135+
}
136+
137+
56138

57139

58-
/* These are the various buttons in the interface */
59140
.image-button,
60141
.titlebutton {
61142
background-color: transparent;
@@ -75,34 +156,18 @@ entry.flat {
75156
box-shadow: none;
76157
}
77158

159+
78160
/* This is the EditableLabel */
79161
.jorts-label {
80162
font-weight: 700;
81163
font-size: 0.88em;
82164
}
83165

84166
.jorts-label:backdrop {
85-
color: mix (@textColorPrimary, @colorPrimary, 0.3);
167+
color: mix (@textColorPrimary, @SecondaryColor, 0.3);
168+
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
86169
}
87170

88171
.jorts-bar box {
89172
border: none;
90173
}
91-
92-
93-
94-
/* These are the colored pills to select theme */
95-
.color-button {
96-
border-radius: 50%;
97-
background-image: none;
98-
border: 1px solid alpha(#333, 0.25);
99-
box-shadow:
100-
inset 0 1px 0 0 alpha (@inset_dark_color, 0.7),
101-
inset 0 0 0 1px alpha (@inset_dark_color, 0.3),
102-
0 1px 0 0 alpha (@bg_highlight_color, 0.3);
103-
}
104-
105-
.color-button:hover,
106-
.color_button:focus {
107-
border: 1px solid @inset_dark_color;
108-
}

meson.build

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ cc = meson.get_compiler('c')
5656
executable(
5757
meson.project_name(),
5858
gresource,
59-
'src/Application.vala',
60-
'src/MainWindow.vala',
6159
'src/Widgets/EditableLabel.vala',
6260
'src/Services/NoteManager.vala',
6361
'src/Services/Storage.vala',
6462
'src/Services/Themer.vala',
63+
'src/Services/Utils.vala',
64+
'src/Application.vala',
65+
'src/MainWindow.vala',
6566
c_args: c_args,
6667
dependencies: [
6768
dependency('granite'),

po/POTFILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ src/Services/NoteManager.vala
44
src/Services/Storage.vala
55
src/Widgets/ColorButton.vala
66
src/Widgets/EditableLabel.vala
7+
src/Services/Utils.vala

src/Application.vala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ namespace jorts {
6060
}
6161

6262
protected override void activate () {
63-
var provider = new Gtk.CssProvider ();
64-
provider.load_from_resource ("/io/github/ellie_commons/jorts/Application.css");
65-
6663
if (get_windows ().length () > 0) {
6764
foreach (var window in open_notes) {
6865
if (window.visible) {
@@ -85,7 +82,7 @@ namespace jorts {
8582

8683
public void create_note(Storage? storage) {
8784
debug ("Creating a note…\n");
88-
var note = new MainWindow(this,storage);
85+
var note = new MainWindow(this, storage);
8986
open_notes.add(note);
9087
update_storage();
9188
}
@@ -146,4 +143,4 @@ namespace jorts {
146143
return app.run(args);
147144
}
148145
}
149-
}
146+
}

0 commit comments

Comments
 (0)