Skip to content

Commit c4c46a1

Browse files
committed
Some cleanup
1 parent 9230d2f commit c4c46a1

File tree

5 files changed

+39
-23
lines changed

5 files changed

+39
-23
lines changed

data/Application.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ windowcontrols button:focus {
7979
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
8080
}
8181

82+
/* Have windowcontrol act like the other buttons */
83+
windowcontrols:backdrop button:hover {
84+
background: alpha(@fg_color, 0.3);
85+
}
86+
windowcontrols:backdrop button:not(:hover) {
87+
background: none;
88+
}
89+
8290
editablelabel {
8391
font-weight: 800;
8492
font-size: 1.10em;
@@ -88,6 +96,7 @@ editablelabel {
8896
letter-spacing: .02em;
8997
}
9098

99+
/* Smaller text when editing */
91100
editablelabel.editing {
92101
font-weight: 500;
93102
font-size: 1em;
@@ -166,6 +175,10 @@ window.ultrahuge textview {font-size: 2.8em;}
166175
window.ultrahuge editablelabel {font-size: 2.65em;}
167176
window.ultrahuge editablelabel.editing {font-size: 2.60em;}
168177

178+
window.urmom textview {font-size: 3em;}
179+
window.urmom editablelabel {font-size: 2.85em;}
180+
window.urmom editablelabel.editing {font-size: 2.80em;}
181+
169182

170183
/* ALL the colorpills */
171184
colorpill.blueberry {background-color: @BLUEBERRY_300;}

src/MainWindow.vala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,13 @@ namespace jorts {
220220
return false;
221221
});
222222

223-
this.popover.show.connect(() => {
224-
//popover.set_zoomlevel(this.zoom);
223+
this.activate_focus.connect(() => {
224+
print("Focused! " + this.title );
225225

226+
//popover.set_zoomlevel(this.zoom);
226227
// Use appropriate sheet
227-
var stylesheet = "io.elementary.stylesheet." + this.theme.ascii_down();
228-
this.gtk_settings.gtk_theme_name = stylesheet;
228+
var stylesheet = "io.elementary.stylesheet." + this.theme.ascii_down();
229+
this.gtk_settings.gtk_theme_name = stylesheet;
229230
});
230231

231232

src/Services/Constants.vala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Just Dump constants here
2727

2828
namespace jorts.Constants {
2929

30+
const string app_rdnn = "io.github.ellie_commons.jorts";
31+
32+
3033
// As seen on TV!
3134
// Later adds: LATTE, BLACK, SILVER, AUTO
3235
const string[] themearray = {
@@ -42,11 +45,10 @@ namespace jorts.Constants {
4245
"SLATE"
4346
};
4447

45-
const string app_rdnn = "io.github.ellie_commons.jorts";
4648

4749
// We need to say stop at some point
4850
const int max_zoom = 200;
49-
const int min_zoom = 60;
51+
const int min_zoom = 40;
5052

5153
// For new stickies
5254
const int defaut_height = 330;

src/Services/Themer.vala

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ init_all_themes()
3535
namespace jorts.Themer {
3636

3737
// Here we go
38+
// Take up a elementary OS color name and gurgle back a CSS string
3839
public static string generate_css (string theme) {
3940
debug("Generating css");
4041
string style = "";
@@ -119,15 +120,15 @@ namespace jorts.Themer {
119120
}
120121
121122
window.${accent_color}:backdrop editablelabel {
122-
color: alpha(@${accent_color}_900, 0.88);
123+
color: alpha(@${accent_color}_900, 0.75);
123124
}
124125
125126
window.${accent_color}:backdrop editablelabel,
126127
window.${accent_color}:backdrop actionbar,
127128
window.${accent_color}:backdrop actionbar image,
128129
window.${accent_color}:backdrop windowcontrols,
129130
window.${accent_color}:backdrop windowcontrols image {
130-
color: alpha(@${accent_color}_900, 0.88);
131+
color: alpha(@${accent_color}_900, 0.75);
131132
}
132133
133134
"""));
@@ -137,9 +138,12 @@ namespace jorts.Themer {
137138
return style;
138139
}
139140

141+
// Called once, at the start of the app
142+
// Loads the standard sheet, then do all the different themes
140143
public static void init_all_themes() {
144+
debug("Init all themes");
141145

142-
// Also the standard sheet
146+
// Use standard sheet
143147
var app_provider = new Gtk.CssProvider ();
144148
app_provider.load_from_resource ("/io/github/ellie_commons/jorts/Application.css");
145149
Gtk.StyleContext.add_provider_for_display (
@@ -148,23 +152,18 @@ namespace jorts.Themer {
148152
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1
149153
);
150154

151-
debug("Init all themes");
155+
// Then generate all theme classes
152156
foreach (unowned var theme in jorts.Constants.themearray) {
153-
// Palette color
154-
var theme_provider = new Gtk.CssProvider ();
155-
var style = jorts.Themer.generate_css (theme);
156-
157-
// for the move away from stylecontext
158-
// print(style);
157+
var theme_provider = new Gtk.CssProvider ();
158+
var style = jorts.Themer.generate_css (theme);
159159

160160
theme_provider.load_from_string (style);
161161

162-
163-
Gtk.StyleContext.add_provider_for_display (
164-
Gdk.Display.get_default (),
165-
theme_provider,
166-
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
167-
);
168-
}
162+
Gtk.StyleContext.add_provider_for_display (
163+
Gdk.Display.get_default (),
164+
theme_provider,
165+
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
166+
);
167+
}
169168
}
170169
}

src/Services/Utils.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ namespace jorts.Utils {
4949
case 220: return "superhuge";
5050
case 240: return "megahuge";
5151
case 260: return "ultrahuge";
52+
case 280: return "urmom";
5253
default: return "normal_zoom";
5354
}
5455
}

0 commit comments

Comments
 (0)