summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/staticbrowserbox.cpp13
-rw-r--r--src/gui/widgets/staticbrowserbox.h3
2 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/widgets/staticbrowserbox.cpp b/src/gui/widgets/staticbrowserbox.cpp
index 5999b2adf..8b3106b24 100644
--- a/src/gui/widgets/staticbrowserbox.cpp
+++ b/src/gui/widgets/staticbrowserbox.cpp
@@ -84,7 +84,8 @@ StaticBrowserBox::StaticBrowserBox(const Widget2 *const widget,
mProcessVars(false),
mEnableImages(false),
mEnableKeys(false),
- mEnableTabs(false)
+ mEnableTabs(false),
+ mSeparator(false)
{
mAllowLogic = false;
@@ -156,6 +157,14 @@ void StaticBrowserBox::setLinkHandler(LinkHandler* linkHandler)
mLinkHandler = linkHandler;
}
+void StaticBrowserBox::addSeparator(const std::string &row)
+{
+ if (mSeparator)
+ return;
+ addRow(row, false);
+ mSeparator = true;
+}
+
void StaticBrowserBox::addRow(const std::string &row,
const bool atTop)
{
@@ -168,6 +177,8 @@ void StaticBrowserBox::addRow(const std::string &row,
if (getWidth() < 0)
return;
+ mSeparator = false;
+
if (mProcessVars)
{
BrowserBoxTools::replaceVars(tmp);
diff --git a/src/gui/widgets/staticbrowserbox.h b/src/gui/widgets/staticbrowserbox.h
index 93d05049f..ff5862577 100644
--- a/src/gui/widgets/staticbrowserbox.h
+++ b/src/gui/widgets/staticbrowserbox.h
@@ -72,6 +72,8 @@ class StaticBrowserBox final : public Widget,
void setOpaque(Opaque opaque)
{ mOpaque = opaque; }
+ void addSeparator(const std::string &row);
+
/**
* Adds a text row to the browser.
*/
@@ -183,6 +185,7 @@ class StaticBrowserBox final : public Widget,
bool mEnableImages;
bool mEnableKeys;
bool mEnableTabs;
+ bool mSeparator;
static ImageSet *mEmotes;
static int mInstances;