summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c1
-rw-r--r--amiga/system_colour.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 9d1abef05..5a5e900a8 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -494,6 +494,7 @@ void gui_init(int argc, char** argv)
ami_font_setdevicedpi(0); /* for early font requests, eg treeview init */
+ /* Some defaults, these are overridden later in gui_system_colour_init */
scrollbar_widget_fg_colour = 0x00aaaaaa;
scrollbar_widget_bg_colour = 0x00833c3c;
scrollbar_widget_arrow_colour = 0x00d6d6d6;
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;