summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-31 12:59:49 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-31 12:59:49 +0000
commit1200fedb1c42839da1791c5c46d881a02a47b9c0 (patch)
treea4e8c05c62ec27e3b205b420c88cec89095dc9f3
parent0dea8112d444a711e6d1e3914d6956e752ac1089 (diff)
downloadnetsurf-1200fedb1c42839da1791c5c46d881a02a47b9c0.tar.gz
netsurf-1200fedb1c42839da1791c5c46d881a02a47b9c0.tar.bz2
Enable alpha bitmaps in chooser.gadget on OS4.1FE
-rw-r--r--amiga/gui.c10
-rw-r--r--amiga/os3support.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 1fdb6e7c7..e6487ea3d 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -43,6 +43,7 @@
/* Other OS includes */
#include <datatypes/textclass.h>
#include <devices/inputevent.h>
+#include <graphics/gfxbase.h>
#include <graphics/rpattr.h>
#ifdef __amigaos4__
#include <graphics/blitattr.h>
@@ -4965,11 +4966,20 @@ static nserror gui_search_web_provider_update(const char *provider_name,
if(gwin->search_bm != NULL)
DisposeObject(gwin->search_bm);
+ ULONG bm_masking_tag = TAG_IGNORE;
+
+ if(GfxBase->LibNode.lib_Version >= 54) { /* chooser 53.21, but check gfx.lib
+ * is FE as it's easier */
+ bm_masking_tag = BITMAP_Masking;
+ }
+
gwin->search_bm = BitMapObj,
BITMAP_Screen, scrn,
BITMAP_Width, 16,
BITMAP_Height, 16,
BITMAP_BitMap, bm,
+ BITMAP_HasAlpha, TRUE,
+ bm_masking_tag, TRUE,
BitMapEnd;
RefreshSetGadgetAttrs((struct Gadget *)gwin->objects[GID_SEARCH_ICON],
diff --git a/amiga/os3support.h b/amiga/os3support.h
index 4752e9109..f0667b55f 100644
--- a/amiga/os3support.h
+++ b/amiga/os3support.h
@@ -62,6 +62,7 @@
/* Ignore unsupported tags */
#define ASO_NoTrack TAG_IGNORE
#define BITMAP_DisabledSourceFile TAG_IGNORE
+#define BITMAP_HasAlpha TAG_IGNORE
#define BLITA_UseSrcAlpha TAG_IGNORE
#define BLITA_MaskPlane TAG_IGNORE
#define CLICKTAB_CloseImage TAG_IGNORE