- /* Positions of UI elements. Layout:
-
- +---------+-+---------------------------------------+
- | LOGO | | HEADER |
- | | |---------------------------------------|
- | | | NOTE TEXT |
- | DEAD | | |
- | LINE | | |
- | TIMERS | | |
- | | | |
- | | | |
- | | | |
- | | | |
- | | | |
- +---------+ | |
- | LINKS | +---------------------------------------+
- | LINKS | | FOOTER |
- +---------+-+---------------------------------------+
-
- The right side of the UI maximises to available width.
- The note text maximises to available height.
- The logo, header and timers are anchored to the top left of the window.
- The links and footer are anchored to the bottom left of the window.
- The entire window is a fixed 4:3 scale, with a minimum margin around it.
- */
-
- /* Minimum margin around the window */
- int margin_size = 50;
-
- /* Right side of window (header, ransom note, BTC address, buttons) */
- const int right_pane_x = 270;
- /* "oops" header */
- const int header_y = 5;
- /* Ransom note */
- const int ransom_y = 40;
- /* Footer area */
- const int footer_height = 100;
-
- /* Left pane (deadlines, countdown, links) */
- const int left_pane_width = right_pane_x - 5;
- /* Logo (shown at top left corner) */
- int logo_x = (left_pane_width - pix_w) / 2;
- int logo_y = 10;
- /* Deadline position */
- const int deadline_y = 130;
- /* Links height */
- const int links_height = 100;
- const int links_x = 20;
-
- /* main window text */
- unsigned long fg = bst->fg;
- unsigned long bg = bst->bg;
- /* ransom note */
- unsigned long fg2 = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.foreground2",
- "Ransomware.Foreground");
- unsigned long bg2 = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.background2",
- "Ransomware.Background");
- /* buttons */
- unsigned long fg3 = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.foreground3",
- "Ransomware.Foreground");
- unsigned long bg3 = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.background3",
- "Ransomware.Background");
- /* links */
- unsigned long link = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.link",
- "Ransomware.Foreground");
- /* headers */
- unsigned long theader = get_pixel_resource (dpy, bst->xgwa.colormap,
- "ransomware.timerheader",
- "Ransomware.Foreground");
-