Add a pill style to the label of the first day of the month to make it easy to identify. Adjust the border radius of the existing pill style for the current date to be the same. Apply the font-weight using the new style class. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/647>
88 lines
1.7 KiB
Plaintext
88 lines
1.7 KiB
Plaintext
using Gtk 4.0;
|
|
|
|
template $GcalMonthView: Widget {
|
|
overflow: hidden;
|
|
|
|
styles [
|
|
"month-view",
|
|
]
|
|
|
|
EventControllerScroll {
|
|
flags: vertical | kinetic;
|
|
scroll-begin => $on_scroll_controller_scroll_begin_cb(template) not-swapped;
|
|
scroll => $on_scroll_controller_scroll_cb(template) not-swapped;
|
|
scroll-end => $on_scroll_controller_scroll_end_cb(template) not-swapped;
|
|
decelerate => $on_scroll_controller_decelerate_cb(template) not-swapped;
|
|
}
|
|
|
|
EventControllerScroll {
|
|
flags: vertical | discrete;
|
|
scroll => $on_discrete_scroll_controller_scroll_cb(template) not-swapped;
|
|
}
|
|
|
|
GestureClick {
|
|
button: 1;
|
|
pressed => $on_click_gesture_pressed_cb(template) not-swapped;
|
|
released => $on_click_gesture_released_cb(template) not-swapped;
|
|
}
|
|
|
|
EventControllerMotion motion_controller {
|
|
propagation-phase: none;
|
|
motion => $on_motion_controller_motion_cb(template) not-swapped;
|
|
}
|
|
|
|
[header]
|
|
Box {
|
|
styles [
|
|
"header",
|
|
"heading",
|
|
"month-header",
|
|
"view",
|
|
]
|
|
|
|
homogeneous: true;
|
|
|
|
Label label_0 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_1 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_2 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_3 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_4 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_5 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
|
|
Label label_6 {
|
|
margin-start: 12;
|
|
hexpand: true;
|
|
xalign: 0.0;
|
|
}
|
|
}
|
|
}
|