summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/browserbox.h')
-rw-r--r--src/gui/widgets/browserbox.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index 7066585d..142bba63 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -51,6 +51,7 @@ struct LinePart
int x;
int y;
gcn::Color color;
+ std::optional<gcn::Color> outlineColor;
std::string text;
gcn::Font *font;
};
@@ -86,6 +87,8 @@ class BrowserBox : public gcn::Widget,
*/
void setLinkHandler(LinkHandler *handler) { mLinkHandler = handler; }
+ void setPalette(int palette) { mPalette = palette; }
+
/**
* Sets the Highlight mode for links.
*/
@@ -154,29 +157,6 @@ class BrowserBox : public gcn::Widget,
void drawFrame(gcn::Graphics *) override {}
/**
- * BrowserBox colors.
- *
- * NOTES (by Javila):
- * - color values is "0x" prefix followed by HTML color style.
- * - we can add up to 10 different colors: [0..9].
- * - not all colors will be fine with all backgrounds due transparent
- * windows and widgets. So, I think it's better keep BrowserBox
- * opaque (white background) by default.
- */
- enum
- {
- RED = 0xff0000, /**< Color 1 */
- GREEN = 0x009000, /**< Color 2 */
- BLUE = 0x0000ff, /**< Color 3 */
- ORANGE = 0xe0980e, /**< Color 4 */
- YELLOW = 0xf1dc27, /**< Color 5 */
- PINK = 0xff00d8, /**< Color 6 */
- PURPLE = 0x8415e2, /**< Color 7 */
- GRAY = 0x919191, /**< Color 8 */
- BROWN = 0x8e4c17 /**< Color 9 */
- };
-
- /**
* Highlight modes for links.
* This can be used for a bitmask.
*/
@@ -195,6 +175,7 @@ class BrowserBox : public gcn::Widget,
std::deque<TextRow> mTextRows;
LinkHandler *mLinkHandler = nullptr;
+ int mPalette = 0;
Mode mMode;
unsigned int mHighlightMode = UNDERLINE | BACKGROUND;
int mWrapIndent = 0;