|
Post by bigbass on May 8, 2020 4:53:23 GMT 1
Hello Peter I think you may have left out an image BaCon.xbm chiselapp.com/user/bacon/repository/bacon/dir?ci=trunk&name=bacon_trunk/icons&type=treefrom this update Specifying callback both for MRM and main shell fix compiling it stops here /usr/bin/install -c -m 644 icons/BaCon.png /usr/share/pixmaps /usr/bin/install -c -m 644 icons/BaCon.xbm /usr/share/pixmaps /usr/bin/install: cannot stat 'icons/BaCon.xbm': No such file or directory make: *** [Makefile:56: install] Error 1 should be easy to adjust just a notice another probably too big in kb to be included but would look good in Xlib /motif I renamed it and it works in the taskbar on the raspberrypi correctly it gets auto resized BaConEyes.xbm (12.6 KB) yes, it was the icon your app compiles and works perfectly after adding the icon Joe
|
|
|
Post by Pjot on May 8, 2020 6:57:10 GMT 1
I think you may have left out an image BaCon.xbm Right, it's been added to the repo now Thanks, Peter
|
|
|
Post by bigbass on May 8, 2020 21:02:50 GMT 1
after I passed this through gimp I was able to produce a nice wave effect after several failed attempts I like it hope it comes up somewhere in an app Joe
|
|
|
Post by vovchik on May 8, 2020 21:36:56 GMT 1
Dear Joe, That is both very clever and visually appealing. I like it and will use it. Thanks!!! With kind regards, vovchik UPDATE: I have included an SVG of the same. And I (sort of) HAD to do that partucular image as an SVG because it relates to the periodic chart and, in a very tangential way, to my own family: my grandfather actually studied chemistry under Mendeleev. Attachments:bacon-wave2.svg.tar.gz (3.44 KB)
|
|
|
Post by bigbass on May 8, 2020 22:56:12 GMT 1
I'm glad you like it and if it reminds you of your Grandfather in a special way that's even better and a nice story (thanks for reminding me of My Grandfather he raised me as a child and was my hero) thanks for the svg they are very clean and easy to resize here is the same with the alpha channel removed in different standard sizes alpha bacon-wave.tar.gz (187.55 KB) Joe
|
|
|
Post by Pjot on May 9, 2020 9:00:37 GMT 1
Thanks everybody, nice logo!
BR Peter
|
|
|
Post by vovchik on May 9, 2020 9:40:42 GMT 1
Dear Joe and Peter (and all), Here is a slightly more bacony version - I just substituted ghostwhite for gold in the SVG, and it looks a bit more like authentic "bacon". The nice thing about the SVG is that it can easily be included in code and it is only 8k. With kind regards, vovchik UPDATED: Removed first line (<?xml version='1.0' encoding='UTF-8'?>) that caused problems with gimp 2.10. Attachments:
bacon-wave3.svg.tar.gz (3.38 KB)
|
|
|
Post by bigbass on May 9, 2020 17:50:34 GMT 1
Hello vovchik
I like what you posted as is
I trust your artistic abilities and I think I understand the the more bacon looking you are shooting for the colors in Peter's avatar would be the (more bacon looking) if we could get those colors I tried with gimp and the exact color with the eye dropper and the end result was the red was too dark and the yellow tone was off too
vovchik if you can do it (I had three eye surgeries and very thankful I can see again)
I Know it would be better Joe
|
|
|
Post by Pjot on May 9, 2020 18:06:57 GMT 1
Thanks guys, @ vovchik: my GIMP could not load your SVG, I receive an error "unsupported file format"? So I converted the PNG from Joe to XPM. The below program loads the XPM version and displays it in Motif Regards Peter OPTION GUI TRUE PRAGMA GUI motif
DECLARE fg, bg
id = GUIDEFINE( " \ { type=window name=window XmNwidth=256 XmNheight=146 XmNtitle=\"BaCon\" } \ { type=xmLabelWidgetClass name=xpm parent=window XmNlabelType=XmPIXMAP } ")
CALL GUIGET(id, "xpm", XmNforeground, &fg, XmNbackground, &bg) pixmap = XmGetPixmap(XtScreen(GUIWIDGET(id, "xpm")), DIRNAME$(ME$) & "/bacon-wave-256.xpm", fg, bg) CALL GUISET(id, "xpm", XmNlabelPixmap, pixmap)
CALL GUIEVENT$(id)
Attachments:bacon-wave-256.xpm (88.97 KB)
|
|
|
Post by vovchik on May 9, 2020 19:14:53 GMT 1
Dear Peter, @ vovchik: my GIMP could not load your SVG, I receive an error "unsupported file format" I see what you mean by gimp not wanting to load - gimp 2.10 does not on the Pi4 and gimp 2.8 on Mint does. Other SVGs load, so that it is something in the header (first line). When I remove it, it loads fine in Gimp 2.10. And, with or without that first line (<?xml version='1.0' encoding='UTF-8'?>), imagemagick convert will convert the svg to png/jpg/... With kind regards, vovchik
|
|
|
Post by bigbass on May 9, 2020 19:21:41 GMT 1
Helllo Peter and vovchik I just tested Peter's demo and works correctly and gave some nice color to motif and as usual I was curious to see if a png would actually load in motif and it does! only changed the .xpm to .png in Peter's demo "/bacon-wave-256.png" that's some good news we can breathe some new life into the widgets because of the quality of png Joe my config is file is .Xdefaults-raspberrypi xrdb .Xdefaults-raspberrypi
and change this to whatever color you want without recompiling the code again ! Coloring- *background: white *Text*background: white *XmText*background: white *List*background: white *XmList*background: white because its has an alpha channel
|
|
|
Post by Pjot on May 9, 2020 19:24:45 GMT 1
Thanks vovchik, Removing that first line worked! BR Peter Attachments:
bacon-wave3.xpm (169.5 KB)
|
|
|
Post by Pjot on May 10, 2020 19:43:27 GMT 1
All, It seems that the X-server comes with its own list of predefined bitmaps. The POSIX compliant location for these bitmaps is "/usr/include/X11/bitmaps". Sometimes the bitmaps are packaged separately, for example in a 'xbitmaps' package. Anyway, below an adaptation of the above program to view the default bitmap files from X. Regards Peter PS I didnt do my best on resizing the main window. OPTION GUI TRUE PRAGMA GUI motif
CONST dir$ = "/usr/include/X11/bitmaps/"
DECLARE fg, bg, pixmap, nr = 1
id = GUIDEFINE("{ type=window name=window XmNwidth=256 XmNtitle=\"PixViewer\" } \ { type=xmFormWidgetClass name=form parent=window } \ { type=xmLabelWidgetClass name=xpm parent=form XmNwidth=256 XmNheight=256 XmNrecomputeSize=False XmNalignment=XmALIGNMENT_CENTER XmNlabelType=XmPIXMAP } \ { type=xmLabelWidgetClass name=txt parent=form XmNwidth=256 XmNalignment=XmALIGNMENT_CENTER } \ { type=xmPushButtonWidgetClass name=Previous parent=form callback=XmNactivateCallback XmNbottomAttachment=XmATTACH_FORM XmNleftAttachment=XmATTACH_FORM XmNheight=30 XmNwidth=90 } \ { type=xmPushButtonWidgetClass name=Next parent=form callback=XmNactivateCallback XmNbottomAttachment=XmATTACH_FORM XmNrightAttachment=XmATTACH_FORM XmNheight=30 XmNwidth=90 }")
CALL GUISET(id, "txt", XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, GUIWIDGET(id, "xpm")) CALL GUISET(id, "txt", XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, GUIWIDGET(id, "Previous")) CALL GUISET(id, "txt", XmNlabelString, XmStringCreateLocalized("Press button to see picture..."))
pix$ = WALK$(dir$, 1, ".+", FALSE)
WHILE TRUE event$ = GUIEVENT$(id) SELECT event$ CASE "Previous" DECR nr IF nr = 0 THEN nr = AMOUNT(pix$) CASE "Next" INCR nr IF nr > AMOUNT(pix$) THEN nr = 1 ENDSELECT
CALL GUIGET(id, "xpm", XmNforeground, &fg, XmNbackground, &bg) pixmap = XmGetPixmap(XtScreen(GUIWIDGET(id, "xpm")), dir$ & TOKEN$(pix$, nr), fg, bg) CALL GUISET(id, "xpm", XmNlabelPixmap, pixmap)
' Send expose event to redraw picture CALL XClearArea(XtDisplay(GUIWIDGET(id, "xpm")), XtWindow(GUIWIDGET(id, "xpm")), 0, 0, 0, 0, True)
CALL GUISET(id, "txt", XmNlabelString, XmStringCreateLocalized("Displaying file: " & TOKEN$(pix$, nr)) ) WEND
Attachments:
|
|
|
Post by vovchik on May 10, 2020 19:55:09 GMT 1
Dear Peter,
Works as advertised - on Mint 19 and on Pi4 Buster. Thanks!
With kind regards, vovchik
|
|
|
Post by bigbass on May 11, 2020 3:25:54 GMT 1
Hello Peter thanks for another excellent demo just a little note to be compatible with the raspberry pi3 some size adjustments are needed (I saw your note) id = GUIDEFINE("{ type=window name=window XmNwidth=356 XmNheight=356 XmNtitle=\"PixViewer\" } \ and for the previous button XmNwidth= 90 these may just be defaults not set correctly on my box but they can be added in your code manually to work on the RPI3 thanks Joe
|
|