summaryrefslogtreecommitdiff
path: root/amiga/system_colour.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-03 17:22:23 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-07-03 17:22:23 +0000
commitd253daa0202393ca27a6d21d3808332d2f889e28 (patch)
tree2b43ad36cb07e4fe1f470e594348598ad290d48c /amiga/system_colour.c
parenta7d41d3ac20d6e5587058fca132fd3578af58138 (diff)
downloadnetsurf-d253daa0202393ca27a6d21d3808332d2f889e28.tar.gz
netsurf-d253daa0202393ca27a6d21d3808332d2f889e28.tar.bz2
Pick scroller gadget colours from the screen's DrawInfo pens
svn path=/trunk/netsurf/; revision=12568
Diffstat (limited to 'amiga/system_colour.c')
-rw-r--r--amiga/system_colour.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/amiga/system_colour.c b/amiga/system_colour.c
index 69c869a16..8ac763eff 100644
--- a/amiga/system_colour.c
+++ b/amiga/system_colour.c
@@ -29,6 +29,7 @@
#include <proto/graphics.h>
#include <proto/intuition.h>
+#include <proto/Picasso96API.h>
#include <intuition/screens.h>
struct gui_system_colour_ctx {
@@ -246,12 +247,27 @@ static struct gui_system_colour_ctx colour_list[] = {
static struct gui_system_colour_ctx *gui_system_colour_pw = NULL;
+extern colour scrollbar_widget_fg_colour;
+extern colour scrollbar_widget_bg_colour;
+extern colour scrollbar_widget_arrow_colour;
+
css_color ami_css_colour_from_pen(struct Screen *screen, UWORD pen);
+void ami_system_colour_scrollbar_widget(void)
+{
+ if(scrn == NULL) return;
+
+ scrollbar_widget_fg_colour = p96EncodeColor(RGBFB_A8B8G8R8, ami_css_colour_from_pen(scrn, FOREGROUNDPEN)); /* or FILLPEN */
+ scrollbar_widget_bg_colour = p96EncodeColor(RGBFB_A8B8G8R8, ami_css_colour_from_pen(scrn, FILLSHADOWPEN));
+ scrollbar_widget_arrow_colour = p96EncodeColor(RGBFB_A8B8G8R8, ami_css_colour_from_pen(scrn, SHINEPEN));
+}
+
bool gui_system_colour_init(void)
{
unsigned int ccount;
+ ami_system_colour_scrollbar_widget();
+
if (gui_system_colour_pw != NULL)
return false;