Files
federated-calendar/data/theme/gtk-styles.css
T
Isaque Galdino 97d8859574 year-view: Remove hardcoded values
Improve year-view code, removing hardcoded values.

year-view have hardcoded values for grid cell sizes (width and height).
Those values need to be recalculated every time a change in font or any
other style are changed.

Sidebar width was also hardcoded instead of getting its value directly
from the ui file. That would prevent it from drawing the content
accordingly when ui file is changed.

This patch fixes those two issues by retrieving those values from CSS or
ui files.

This patch also adds code to resize and redraw the window when
show-week-numbers property is changed.

Popover mode was also changed and now sidebar will always be shown when
show-week-numbers is set or when there is space for only 3 or less
columns.

https://bugzilla.gnome.org/show_bug.cgi?id=753533
2016-05-16 12:03:39 -03:00

250 lines
4.5 KiB
CSS

@define-color event_shadow_color alpha(black, 0.2);
.nav-button {
background-color: transparent;
background-image: none;
}
/* nav-bar labels */
.start-header {
font: bold 18;
color: @theme_selected_bg_color;
padding: 12px;
}
.end-header {
font: bold 18;
padding: 12px;
}
calendar-view {
padding: 6px;
font: 10;
}
calendar-view.header {
font-weight: bold;
}
calendar-view.current {
background-color: black;
border-radius: 2px;
color: white;
font: bold;
}
calendar-view:selected {
color: @theme_selected_bg_color;
font-weight: bold;
}
calendar-view.overflow:hover {
font-weight: bold;
color: @theme_selected_bg_color;
background-image: linear-gradient(to bottom, shade(@theme_bg_color, 0.9), alpha(@theme_bg_color, 0.2) 10%,
alpha(@theme_bg_color, 0.2) 95%, shade(@theme_bg_color, 0.95) 100%);
}
calendar-view.overflow {
font: 8;
}
calendar-view.lines {
color: alpha(@theme_fg_color, 0.4);
}
calendar-view.first-view-header {
font: bold 16;
color: @theme_selected_bg_color;
padding: 12px;
}
calendar-view.second-view-header {
font: bold 16;
padding: 12px;
color: alpha(@theme_fg_color, 0.55);
}
/* Year View CSS */
.year-view {
padding: 0px;
}
/* Header the padding if for sizing, on drawing the spacing between cells,
* and the padding will be automatically calculated
* Because of year-view widget internals, the color property should be the same
* of .calendar-view.first-view-header selector */
.year-navigator {
padding: 6px 12px;
color: @theme_selected_bg_color;
}
.year-navigator.header {
color: @theme_selected_bg_color;
font-weight: bold;
}
.year-navigator.lines {
color: alpha(@theme_fg_color, 0.4);
}
.year-navigator.days {
padding: 5px;
color: @theme_fg_color;
font: 9;
}
.year-navigator.sunday {
color: alpha(@theme_fg_color, 0.5);
}
.year-navigator.week-numbers {
font-size: 70%;
font-weight: bold;
border-radius: 2px;
background-color: alpha(@theme_fg_color, 0.05);
color: alpha(@theme_fg_color, 0.4);
}
/* these two are supposed be changed in sync with .calendar-view */
.year-navigator.current {
background-color: black;
border-radius: 2px;
color: white;
font: bold;
}
.year-navigator:selected {
color: @theme_selected_bg_color;
font-weight: bold;
}
.year-navigator.with-events {
background-color: @theme_fg_color;
border-radius: 3px;
}
.year-navigator.with-events-selected {
background-color: @theme_selected_bg_color;
}
.year-navigator.with-events-sunday {
background-color: alpha(@theme_fg_color, 0.5);
}
.sidebar-header {
font-weight: bold;
font-size: 11px;
}
.italic-label {
font-style: italic;
}
list.sidebar {
background-color: @theme_bg_color;
}
box.sidebar {
background-color: @theme_bg_color;
border-color: @borders;
border-style: solid;
}
.year-view box.sidebar:dir(ltr) {
border-left-width: 1px;
}
.year-view box.sidebar:dir(rtl) {
border-right-width: 1px;
}
.year-view scrolledwindow {
border-top-width: 0;
border-bottom-width: 0;
}
.year-view button {
border-radius: 0;
border-bottom-width: 0;
}
popover.events {
background-color: @theme_bg_color;
padding: 0;
}
popover.events box {
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
popover.events list {
background-color: @theme_bg_color;
border-radius: 6px;
}
popover.events scrolledwindow {
border-width: 0;
}
popover.events button {
border-radius: 6px;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-style: solid none none;
box-shadow: none;
}
event-widget {
border-radius: 2px;
margin: 2px 2px 1px;
padding: 3px 4px;
font: 9;
}
event-widget.color-dark {
color: white;
outline-color: rgba(0, 0, 0, 0.3);
}
event-widget.color-dark:backdrop {
color: rgba(255, 255, 255, 0.3);
}
event-widget.color-light {
color: black;
outline-color: rgba(255, 255, 255, 0.5);
}
event-widget.color-light:backdrop {
color: rgba(0, 0, 0, 0.3);
}
.middle-entry {
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-bottom-right-radius: 0px;
border-top-right-radius: 0px;
}
.middle-entry:dir(ltr) {
border-left: 0px;
}
.middle-entry:dir(rtl) {
border-right: 0px;
}
.search-viewport {
background-color: @theme_base_color;
}
/* calendar popover */
.calendar-list {
background-color: transparent;
}
.calendar-list > list {
border-radius: 4px;
}