It is possible to theme GtkCalendar widget.
Also if a program uses some unique namespace, it can be accessed directly from
global gtkrc, aside from "class" level design of GtkCalendar.
Note that using different font or dpi will reshape the window to a different size.
For GtkCalendar widget it is okay to use any .ttf font that is installed on the system.
The example style has all the detail comments.
Code: Select all
style "gtk_calendar_example"
{
xthickness = 8 # border width
ythickness = 8 # border height
font_name = "Fjalla One 9" # TTF fontname, number 9 stands for fontsize
fg[NORMAL] = "#FFFFFF" # month, year -text
bg[NORMAL] = "#434343" # month, year, arrow -backg. ; leading/next-month dates-text ; window border
bg[PRELIGHT] = "#434343" # arrow -backg., with mouse-over
bg[ACTIVE] = "#434343" # arrow -backg., clicking
text[NORMAL] = "#CCCCCC" # dates -text
base[NORMAL] = "#000000" # dates -backg.
text[SELECTED] = "#FFFFFF" # weekday-names, clicked-date -text
base[SELECTED] = "#26282E" # weekday-names, clicked-date -backg.
text[ACTIVE] = "#FFFFFF" # may appear... for weekday-names
base[ACTIVE] = "#000000" # if clicking outside of calendar area
engine "pixmap"
{
image
{
function = SHADOW # outer border
detail = "calendar"
recolorable = FALSE
shadow = IN
file = "cb_1.png"
border = { 8, 8, 8, 8} # notice border width/height above..
stretch = TRUE
}
image
{
function = SHADOW # month, year border
detail = "calendar"
recolorable = FALSE
shadow = OUT
file = "cb_2.png"
border = { 3, 3, 3, 3} # to bring inner borders together..
stretch = TRUE
}
image
{
function = FOCUS # clicked date border, must be transparent on the inside
detail = "calendar-day"
file = "cf_1.png"
border = { 2, 2, 2, 2}
stretch = TRUE
}
image
{
function = ARROW # arrow size is 8x8 pixel for this theme
detail = "calendar"
state = NORMAL # states are: normal and prelight ( same for active/selected )
file = "arn.png"
border = { 1, 1, 1, 1}
stretch = TRUE
arrow_direction = RIGHT
}
image
{
function = ARROW
detail = "calendar"
state = NORMAL
file = "aln.png"
border = { 1, 1, 1, 1}
stretch = TRUE
arrow_direction = LEFT
}
image
{
function = ARROW
detail = "calendar"
state = PRELIGHT
file = "arp.png"
border = { 1, 1, 1, 1}
stretch = TRUE
arrow_direction = RIGHT
}
image
{
function = ARROW
detail = "calendar"
state = PRELIGHT
file = "alp.png"
border = { 1, 1, 1, 1}
stretch = TRUE
arrow_direction = LEFT
}
}
}
class "GtkCalendar" style "gtk_calendar_example"
Screenshot shows gsimplecal with different themes, appearing on BMPanel2 click above clock.