summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/popupmenu.cpp1
-rw-r--r--src/gui/widgets/browserbox.cpp11
-rw-r--r--src/gui/widgets/browserbox.h5
-rw-r--r--src/gui/windows/socialwindow.cpp1
-rw-r--r--src/gui/windows/whoisonline.cpp1
5 files changed, 5 insertions, 14 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 1674c5eeb..c048e74f1 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -111,7 +111,6 @@ PopupMenu::PopupMenu() :
mX(0),
mY(0)
{
- mBrowserBox->setHighlightMode(BrowserBox::BACKGROUND);
mBrowserBox->setOpaque(false);
mBrowserBox->setLinkHandler(this);
mRenameListener.setMapItem(nullptr);
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)
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 846a8f369..4adcc5051 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -1211,7 +1211,6 @@ public:
"popupbrowserbox.xml"))
{
mBrowserBox->setPosition(4, 4);
- mBrowserBox->setHighlightMode(BrowserBox::BACKGROUND);
mBrowserBox->setOpaque(false);
mBrowserBox->setLinkHandler(this);
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index e06788a38..e7c60bb39 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -115,7 +115,6 @@ WhoIsOnline::WhoIsOnline() :
mUpdateButton->setDimension(gcn::Rectangle(5, 5, w - 10, 20 + 5));
mBrowserBox->setOpaque(false);
- mBrowserBox->setHighlightMode(BrowserBox::BACKGROUND);
mScrollArea->setDimension(gcn::Rectangle(5, 20 + 10, w - 10, h - 10 - 30));
mScrollArea->setSize(w - 10, h - 10 - 30);
mBrowserBox->setLinkHandler(this);