Skip to content

Commit

Permalink
some solid cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
teamcons committed Jan 26, 2025
1 parent b0d47f7 commit 9e67dfb
Show file tree
Hide file tree
Showing 10 changed files with 477 additions and 252 deletions.
113 changes: 89 additions & 24 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* SPDX-FileCopyrightText: 2025 Stella, whose hairs are shiny and soft. (https://teamcons.carrd.co)
*/


@define-color textColorPrimary #323232;

@define-color MainColor @BLUEBERRY_100;
@define-color SecondaryColor @BLUEBERRY_900;

/* TODO : These only exist to colour the "pills" to select theme. This needs a fixing */


.color-strawberry {
background-color: @STRAWBERRY_100;
}
Expand Down Expand Up @@ -48,14 +47,96 @@



/* Idk wth this is */


/* These are the colored pills to select theme */
.color-button {
border-radius: 50%;
background-image: none;
border: 1px solid alpha(#333, 0.25);
box-shadow:
inset 0 1px 0 0 alpha (@inset_dark_color, 0.7),
inset 0 0 0 1px alpha (@inset_dark_color, 0.3),
0 1px 0 0 alpha (@bg_highlight_color, 0.3);
}

.color-button:hover,
.color_button:focus {
border: 1px solid @inset_dark_color;
}


.window {
background-color: @MainColor;
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.window undershoot.top {
background:
linear-gradient(
@MainColor 0%,
alpha(@MainColor, 0) 50%
);
}

.window undershoot.bottom {
background:
linear-gradient(
alpha(@MainColor, 0) 50%,
@MainColor 100%
);
}

.jorts-view text selection {
color: shade(@MainColor, 1.88);
background-color: @SecondaryColor;
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

entry.flat {
background: transparent;
}

.window .jorts-title image,
.window .jorts-label {
color: @SecondaryColor;
box-shadow: none;
}

.window .jorts-bar {
color: @SecondaryColor;
background-color: @MainColor;
border-top-color: @SecondaryColor;
box-shadow: none;
background-image: none;
padding: 3px;
transition: background-color 800ms cubic-bezier(0.4, 0, 0.2, 1);
transition: color 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.window .jorts-bar image {
color: @SecondaryColor;
padding: 3px;
box-shadow: none;
background-image: none;
}

.window .jorts-view,
.window .jorts-view text,
.window .jorts-title {
background-color: @MainColor;
background-image: none;
border-bottom-color: @SecondaryColor;
font-weight: 500;
font-size: 1.2em;
color: shade(@SecondaryColor, 0.77);
box-shadow: none;
}




/* These are the various buttons in the interface */
.image-button,
.titlebutton {
background-color: transparent;
Expand All @@ -75,34 +156,18 @@ entry.flat {
box-shadow: none;
}


/* This is the EditableLabel */
.jorts-label {
font-weight: 700;
font-size: 0.88em;
}

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

.jorts-bar box {
border: none;
}



/* These are the colored pills to select theme */
.color-button {
border-radius: 50%;
background-image: none;
border: 1px solid alpha(#333, 0.25);
box-shadow:
inset 0 1px 0 0 alpha (@inset_dark_color, 0.7),
inset 0 0 0 1px alpha (@inset_dark_color, 0.3),
0 1px 0 0 alpha (@bg_highlight_color, 0.3);
}

.color-button:hover,
.color_button:focus {
border: 1px solid @inset_dark_color;
}
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ cc = meson.get_compiler('c')
executable(
meson.project_name(),
gresource,
'src/Application.vala',
'src/MainWindow.vala',
'src/Widgets/EditableLabel.vala',
'src/Services/NoteManager.vala',
'src/Services/Storage.vala',
'src/Services/Themer.vala',
'src/Services/Utils.vala',
'src/Application.vala',
'src/MainWindow.vala',
c_args: c_args,
dependencies: [
dependency('granite'),
Expand Down
1 change: 1 addition & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ src/Services/NoteManager.vala
src/Services/Storage.vala
src/Widgets/ColorButton.vala
src/Widgets/EditableLabel.vala
src/Services/Utils.vala
7 changes: 2 additions & 5 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ namespace jorts {
}

protected override void activate () {
var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/io/github/ellie_commons/jorts/Application.css");

if (get_windows ().length () > 0) {
foreach (var window in open_notes) {
if (window.visible) {
Expand All @@ -85,7 +82,7 @@ namespace jorts {

public void create_note(Storage? storage) {
debug ("Creating a note…\n");
var note = new MainWindow(this,storage);
var note = new MainWindow(this, storage);
open_notes.add(note);
update_storage();
}
Expand Down Expand Up @@ -146,4 +143,4 @@ namespace jorts {
return app.run(args);
}
}
}
}
Loading

0 comments on commit 9e67dfb

Please sign in to comment.