mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13:19 +00:00
Improve calendar's lines color contrast
This commit is contained in:
parent
84760b603d
commit
6ca4fd718d
5 changed files with 48 additions and 32 deletions
|
@ -74,7 +74,7 @@ export component Calendar inherits Rectangle {
|
||||||
y: header-height - 32px;
|
y: header-height - 32px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
background: Palette.card-background.transparentize(0.5);
|
background: Palette.card-background.brighter(0.5);
|
||||||
}
|
}
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
y: 0;
|
y: 0;
|
||||||
|
@ -87,7 +87,7 @@ export component Calendar inherits Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for hour[hour-index] in 24 : Rectangle {
|
for hour[hour-index] in 24 : Rectangle {
|
||||||
background: Palette.card-background.transparentize(0.5);
|
background: Palette.card-background.brighter(0.5);
|
||||||
x: 0px;
|
x: 0px;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
y: day-start-y + hour-spacing * hour-index;
|
y: day-start-y + hour-spacing * hour-index;
|
||||||
|
@ -120,7 +120,7 @@ export component Calendar inherits Rectangle {
|
||||||
wrap: TextWrap.word-wrap;
|
wrap: TextWrap.word-wrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eventActionsPopup := VPopupIconMenu {
|
eventActionsPopup := VPopupIconMenu {
|
||||||
//VActionButton {
|
//VActionButton {
|
||||||
|
|
|
@ -8,46 +8,65 @@ import { EditSourceWindow } from "../EditSourceWindow/EditSourceWindow.slint";
|
||||||
import { Palette } from "@selenite";
|
import { Palette } from "@selenite";
|
||||||
import { CalendarView } from "views/CalendarView.slint";
|
import { CalendarView } from "views/CalendarView.slint";
|
||||||
import { VButton } from "../../../external/selenite/components/Button.slint";
|
import { VButton } from "../../../external/selenite/components/Button.slint";
|
||||||
|
import { ToggleButton } from "../../../external/selenite/components/index.slint";
|
||||||
|
|
||||||
export component AppWindow inherits Window {
|
export component AppWindow inherits Window {
|
||||||
|
|
||||||
title: "Mirai";
|
title: "Mirai";
|
||||||
//min-height: 100px;
|
//min-height: 100px;
|
||||||
//max-height: 4000px; // needed, otherwise the window wants to fit the content (on Swaywm)
|
//max-height: 4000px; // needed, otherwise the window wants to fit the content (on Swaywm)
|
||||||
background: Palette.pane;
|
background: Palette.background;
|
||||||
|
|
||||||
private property<bool> show-tasks: false;
|
private property<bool> show-tasks: false;
|
||||||
|
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
|
// padding: 16px;
|
||||||
|
//spacing: 16px;
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
VerticalLayout {
|
Rectangle {
|
||||||
padding: 16px;
|
background: Palette.pane;
|
||||||
alignment: LayoutAlignment.stretch;
|
// border-radius: 8px;
|
||||||
spacing: 8px;
|
//clip: true;
|
||||||
VButton {
|
VerticalLayout {
|
||||||
text: "Calendar";
|
VerticalLayout {
|
||||||
clicked => { show-tasks = false }
|
padding: 16px;
|
||||||
}
|
alignment: LayoutAlignment.stretch;
|
||||||
|
spacing: 8px;
|
||||||
|
ToggleButton {
|
||||||
|
text: "Calendar";
|
||||||
|
active: !show-tasks;
|
||||||
|
clicked => { show-tasks = false }
|
||||||
|
}
|
||||||
|
|
||||||
VButton {
|
ToggleButton {
|
||||||
text: "Tasks";
|
text: "Tasks";
|
||||||
clicked => { show-tasks = true }
|
active: show-tasks;
|
||||||
|
clicked => { show-tasks = true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SideBar {
|
||||||
|
min-width: 256px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
width: 1px;
|
||||||
|
background: Palette.card-background;
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
background: Palette.background;
|
||||||
|
//border-radius: 8px;
|
||||||
|
//clip: true;
|
||||||
|
VerticalLayout {
|
||||||
|
if show-tasks : MainView {
|
||||||
|
horizontal-stretch: 1;
|
||||||
|
}
|
||||||
|
if !show-tasks : CalendarView {
|
||||||
|
horizontal-stretch: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SideBar {
|
}
|
||||||
min-width: 256px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
VerticalLayout {
|
|
||||||
|
|
||||||
|
|
||||||
if show-tasks : MainView {
|
|
||||||
horizontal-stretch: 1;
|
|
||||||
}
|
|
||||||
if !show-tasks : CalendarView {
|
|
||||||
horizontal-stretch: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import { VActionButton } from "../../../../external/selenite/components/index.sl
|
||||||
|
|
||||||
export component CalendarView inherits Rectangle {
|
export component CalendarView inherits Rectangle {
|
||||||
|
|
||||||
background: Palette.background;
|
|
||||||
private property<string> icon-visible: Svg.visible;
|
private property<string> icon-visible: Svg.visible;
|
||||||
private property<string> icon-not-visible: Svg.not-visible;
|
private property<string> icon-not-visible: Svg.not-visible;
|
||||||
private property<bool> completed-tasks-visible: false;
|
private property<bool> completed-tasks-visible: false;
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { AppWindowActions } from "../Actions.slint";
|
||||||
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
||||||
|
|
||||||
export component SideBar inherits Rectangle {
|
export component SideBar inherits Rectangle {
|
||||||
background: Palette.pane;
|
|
||||||
|
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
|
|
|
@ -10,7 +10,6 @@ import { Utils } from "../../../shared/Utils.slint";
|
||||||
|
|
||||||
export component MainView inherits Rectangle {
|
export component MainView inherits Rectangle {
|
||||||
|
|
||||||
background: Palette.background;
|
|
||||||
private property<string> icon-visible: Svg.visible;
|
private property<string> icon-visible: Svg.visible;
|
||||||
private property<string> icon-not-visible: Svg.not-visible;
|
private property<string> icon-not-visible: Svg.not-visible;
|
||||||
private property<bool> completed-tasks-visible: false;
|
private property<bool> completed-tasks-visible: false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue