From 22542afc73dc9a5c029f8be3a03125e3b047e643 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Wed, 9 May 2018 23:05:55 +0200
Subject: [PATCH] bar: Add comment to geom_format_to_pixels
---
include/components/bar.hpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/components/bar.hpp b/include/components/bar.hpp
index 8b45b011..457fc9c1 100644
--- a/include/components/bar.hpp
+++ b/include/components/bar.hpp
@@ -27,6 +27,14 @@ class taskqueue;
class tray_manager;
// }}}
+/**
+ * Allows a new format for width, height, offset-x and offset-y in the bar section
+ *
+ * The new format is X%:Z, where X is in [0, 100], and Z is any real value
+ * describing a pixel offset. The actual value is calculated by X% * max + Z
+ * The max is the monitor width for width and offset-x and monitor height for
+ * the other two
+ */
inline double geom_format_to_pixels(std::string str, double max) {
size_t i;
if ((i = str.find(':')) != std::string::npos) {