aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'config.h')
-rw-r--r--config.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/config.h b/config.h
index 36fe3cd..c0e2cd3 100644
--- a/config.h
+++ b/config.h
@@ -39,18 +39,27 @@ static const char *col_sel_light = "#ffd24a";
enum { SEL_RING = 3 }; /* px per ring */
/* --------------------------------------------------------------- geometry */
-/* CELL_W/CELL_H must suit the font: a cell holds the day number plus
- NAME_LINES lines of `font`. Line height itself is taken from the font at
- runtime, so only these two need revisiting when you change size.
- Rough guide: CELL_W >= 10 * (widest name chars you want), CELL_H >=
- big-font height + NAME_LINES * font height + 12. */
+/* The grid FILLS the window: cell size is computed from whatever space the
+ window manager gives us, divided seven across and six down. Under a
+ tiling WM that means the calendar uses its whole tile instead of sitting
+ in a corner of it, and resizing reflows rather than clipping.
+
+ These are therefore MINIMUMS, not sizes. If the window is too small to
+ honour them the grid stops shrinking and simply overflows -- better than
+ cells too small to read. How many lines a name gets is likewise derived
+ from the cell height at runtime; NAME_LINES_MAX only caps it. */
enum {
- CELL_W = 196,
- CELL_H = 116,
- PAD = 10, /* margin around the grid */
- HEAD_H = 62, /* title + weekday headings */
- DETAIL_H = 116, /* the pane under the grid */
- NAME_LINES = 3, /* how many lines a feast name gets */
+ CELL_W_MIN = 96,
+ CELL_H_MIN = 52,
+ PAD = 10, /* margin around the grid */
+ HEAD_H = 62, /* title + weekday headings */
+ DETAIL_H = 116, /* the pane under the grid */
+ NAME_LINES_MAX = 5,
+
+ /* Preferred size when the window manager lets us choose. A tiling WM
+ will not, and that is fine: the grid reflows to whatever it gets. */
+ WIN_W = 1200,
+ WIN_H = 820,
};
/* ------------------------------------------------------------------ labels */