summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2020-04-07 21:10:30 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2020-04-07 21:32:27 +0100
commit6a7729a04f19f7eff2a68ab2777507b6d07103bf (patch)
treed5f113673112a4864df93935dfcfcee836f90c53 /desktop
parentb55cc0c22268311df8f6ca5002d087827fc0a170 (diff)
downloadnetsurf-6a7729a04f19f7eff2a68ab2777507b6d07103bf.tar.gz
netsurf-6a7729a04f19f7eff2a68ab2777507b6d07103bf.tar.bz2
Scrollbar: Convert to use nscolour.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/scrollbar.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/desktop/scrollbar.c b/desktop/scrollbar.c
index af5536ba4..90ea924cc 100644
--- a/desktop/scrollbar.c
+++ b/desktop/scrollbar.c
@@ -29,6 +29,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "utils/nscolour.h"
#include "utils/nsoption.h"
#include "netsurf/browser_window.h"
#include "netsurf/mouse.h"
@@ -250,29 +251,17 @@ scrollbar_redraw(struct scrollbar *s,
plot_style_t bg_fill_style = {
.fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = nscolours[NSCOLOUR_SCROLL_WELL],
};
plot_style_t fg_fill_style = {
.fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = nscolours[NSCOLOUR_BUTTON_BG],
};
plot_style_t arrow_fill_style = {
.fill_type = PLOT_OP_TYPE_SOLID,
+ .fill_colour = nscolours[NSCOLOUR_BUTTON_FG],
};
- res = ns_system_colour_char("Scrollbar", &bg_fill_style.fill_colour);
- if (res != NSERROR_OK) {
- return res;
- }
-
- res = ns_system_colour_char("ButtonFace", &fg_fill_style.fill_colour);
- if (res != NSERROR_OK) {
- return res;
- }
-
- res = ns_system_colour_char("ButtonText", &arrow_fill_style.fill_colour);
- if (res != NSERROR_OK) {
- return res;
- }
-
area.x0 = x;
area.y0 = y;
area.x1 = x + (s->horizontal ? s->length : SCROLLBAR_WIDTH) - 1;