From becf676dc63f3c3aedaa0df5ed6b3b703db80811 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 16 May 2018 00:02:04 +0200 Subject: [PATCH] - helpbox: replace fixed value with a scalable one Signed-off-by: Thilo Graf Merged with subsequently submitted build fix. --- src/gui/widget/helpbox.cpp | 4 ++-- src/gui/widget/helpbox.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/widget/helpbox.cpp b/src/gui/widget/helpbox.cpp index 66a3835ed..ff014ac37 100644 --- a/src/gui/widget/helpbox.cpp +++ b/src/gui/widget/helpbox.cpp @@ -157,7 +157,7 @@ void Helpbox::addSeparatorLine(const int& line_height, const int& line_indent) addWindowItem(line); } -void Helpbox::addSeparator(const int& line_height) +void Helpbox::addSeparator(const int& line_height, const int& line_indent) { CComponentsItem *pre_item = !ccw_body->empty() ? ccw_body->back() : NULL; //get the last current item @@ -170,7 +170,7 @@ void Helpbox::addSeparator(const int& line_height) line->setPageNumber(page); int w_body = ccw_body->getWidth(); - line->setWidth(w_body - 40); + line->setWidth(w_body - 2*line_indent); line->setColorBody(ccw_body->getColorBody()); addWindowItem(line); diff --git a/src/gui/widget/helpbox.h b/src/gui/widget/helpbox.h index 6e0798291..238a79c1b 100644 --- a/src/gui/widget/helpbox.h +++ b/src/gui/widget/helpbox.h @@ -161,7 +161,8 @@ public: void addSeparatorLine( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT); ///adds a simple empty separator as horizontal space, arg 'line_height' defines the space of full separator height - void addSeparator( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT); + void addSeparator( const int& line_height = HELPBOX_DEFAULT_LINE_HEIGHT, + const int& line_indent = HELPBOX_DEFAULT_LINE_INDENT); void addPagebreak();