From b58c8cd3c535e66aa41e82309483e26604f92ea4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 3 Dec 2013 12:38:28 +0100 Subject: [PATCH] cc_frm_clock.cpp: add space as a possible seperator Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ef78791ec2fef35cab2889b025395922dcc69508 Author: vanhofen Date: 2013-12-03 (Tue, 03 Dec 2013) Origin message was: ------------------ - cc_frm_clock.cpp: add space as a possible seperator --- src/gui/components/cc_frm_clock.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 5ffa37582..ad0d17d9f 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -151,11 +151,10 @@ void CComponentsFrmClock::initCCLockItems() } } - int w_tmp; - int minSepWidth = (*getClockFont())->getRenderWidth(":", true); - w_tmp = (*getClockFont())->getRenderWidth(".", true); - if (w_tmp > minSepWidth) - minSepWidth = w_tmp; + int minSepWidth = 0; + minSepWidth = std::max((*getClockFont())->getRenderWidth(" ", true), minSepWidth); + minSepWidth = std::max((*getClockFont())->getRenderWidth(".", true), minSepWidth); + minSepWidth = std::max((*getClockFont())->getRenderWidth(":", true), minSepWidth); //modify available label items with current segment chars for (size_t i = 0; i < v_cc_items.size(); i++) @@ -183,6 +182,7 @@ void CComponentsFrmClock::initCCLockItems() case '0' ... '9': wtmp = (*getClockFont())->getMaxDigitWidth(); break; + case ' ': case '.': case ':': wtmp = minSepWidth;