summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-09-05 13:52:21 +0200
committerDave Davenport <qball@gmpclient.org>2017-09-05 13:52:21 +0200
commitba296f921087453ca36c45af4be4e2ff3d6007a5 (patch)
tree9c67f8f2c0973f28fb469bba13ea805fee29bf25 /include
parent6dae152e3179f83d69c63850745e6638a280222e (diff)
Add `ch` as size unit.
Diffstat (limited to 'include')
-rw-r--r--include/rofi-types.h2
-rw-r--r--include/widgets/textbox.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/rofi-types.h b/include/rofi-types.h
index 80998463..4e2d1882 100644
--- a/include/rofi-types.h
+++ b/include/rofi-types.h
@@ -80,6 +80,8 @@ typedef enum
ROFI_PU_EM,
/** PixelWidget in percentage */
ROFI_PU_PERCENT,
+ /** PixelWidth in CH. */
+ ROFI_PU_CH,
} RofiPixelUnit;
/**
diff --git a/include/widgets/textbox.h b/include/widgets/textbox.h
index b330045b..3ea8074b 100644
--- a/include/widgets/textbox.h
+++ b/include/widgets/textbox.h
@@ -237,6 +237,12 @@ int textbox_get_font_width ( const textbox *tb );
double textbox_get_estimated_char_width ( void );
/**
+ * Estimate the width of a 0.
+ *
+ * @returns the width of a 0 in pixels.
+ */
+double textbox_get_estimated_ch ( void );
+/**
* Estimate the height of a character.
*
* @returns the height of a character in pixels.