summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-09 15:05:46 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-09 15:05:46 +0300
commit570c180eb44a832ff3fa2f7e262246a8ab543ff1 (patch)
tree143c0cf02d52f2e252c16681e92ac6cbe1e7710d /src/gui/widgets
parentf5e41e9dc8560923b4e9b8ef89f518aaf651dfa8 (diff)
downloadplus-570c180eb44a832ff3fa2f7e262246a8ab543ff1.tar.gz
plus-570c180eb44a832ff3fa2f7e262246a8ab543ff1.tar.bz2
plus-570c180eb44a832ff3fa2f7e262246a8ab543ff1.tar.xz
plus-570c180eb44a832ff3fa2f7e262246a8ab543ff1.zip
Add browserbox links theme options.
New theme options: highlightBackground - highlight link with background filling. highlightUnderline - highlight link with underline.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/browserbox.cpp11
-rw-r--r--src/gui/widgets/browserbox.h5
2 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index a2bee9219..023c3298d 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -61,7 +61,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mLinkHandler(nullptr),
mSkin(nullptr),
mMode(mode),
- mHighMode(UNDERLINE | BACKGROUND),
+ mHighMode(0),
mSelectedLink(-1),
mMaxRows(0),
mHeight(0),
@@ -102,6 +102,10 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
mPadding = mSkin->getPadding();
mNewLinePadding = mSkin->getOption("newLinePadding", 15);
mItemPadding = mSkin->getOption("itemPadding");
+ if (mSkin->getOption("highlightBackground"))
+ mHighMode |= BACKGROUND;
+ if (mSkin->getOption("highlightUnderline"))
+ mHighMode |= UNDERLINE;
}
mColors[0][BLACK] = getThemeColor(Theme::BLACK);
@@ -163,11 +167,6 @@ void BrowserBox::setOpaque(bool opaque)
mOpaque = opaque;
}
-void BrowserBox::setHighlightMode(const unsigned int highMode)
-{
- mHighMode = highMode;
-}
-
void BrowserBox::addRow(const std::string &row, const bool atTop)
{
std::string tmp = row;
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 7c2d3c053..3c470121a 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -133,11 +133,6 @@ class BrowserBox final : public gcn::Widget,
void setOpaque(bool opaque);
/**
- * Sets the Highlight mode for links.
- */
- void setHighlightMode(const unsigned int highMode);
-
- /**
* Sets the maximum numbers of rows in the browser box. 0 = no limit.
*/
void setMaxRow(unsigned max)