| Author |
Message |
don570

Joined: 10 Mar 2010 Posts: 2457 Location: Ontario
|
Posted: Mon 23 Jan 2012, 15:22 Post subject:
How to put color in GTKDIALOG |
|
I have put together two scripts , one for gtkdialog3 and
the other for the newer gtkdialog4 to show how easy it is
to put some color in message windows.
The scripts don't do anything useful but they show how easy it is
to add a button and the resulting colorful message window.
Here's another example of what is possible.
Thanks to Radky for the code. I stole it from PupShutdown.
Some notes:
1) The double quote needs protection with \
2) A width request for text is important as the example shows.
3) A variable such as $VAR doesn't have protection.
4) Both bold and underlining is possible simultaneously
| Code: | | [b][u]....text.....[/u][/b] |
5) A color can be a hex number instead.
You can use mtpaint to get the hex number.
The dropper can be used anywhere on
your computer screen to find the appropriate color.
____________________________________________________
| Description |
Two scripts for demonstration purposes only!!
|

Download |
| Filename |
colored_message_scripts.tar.gz |
| Filesize |
1.14 KB |
| Downloaded |
212 Time(s) |
Last edited by don570 on Mon 23 Jan 2012, 16:59; edited 2 times in total
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Mon 23 Jan 2012, 15:59 Post subject:
|
|
Somewhere in the gtkdialog tips thread is an example I posted that shows all named colors from rgb.txt. (red, blue, black ...) Those are supported too, also included a tool to auto-generate a 1x1 xpm that easily can be scaled.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2457 Location: Ontario
|
Posted: Mon 23 Jan 2012, 16:11 Post subject:
|
|
When you have the time could you track down the pages.??
_____________________________________________________
Last edited by don570 on Tue 24 Jan 2012, 16:36; edited 1 time in total
|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1229 Location: Ukraine
|
Posted: Mon 23 Jan 2012, 16:38 Post subject:
|
|
Dear guys,
I did a markup editor once and it is here: http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=30359. I also have a simpler markup editor somewhere else on the forum.
With kind regards,
vovchik
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Thu 02 Aug 2012, 09:17 Post subject:
|
|
| don570 wrote: | | When you have the time could you track down the pages.?? |
color thing is here-
http://www.murga-linux.com/puppy/viewtopic.php?p=559741#559741
rgb file on pup5 is at
/usr/share/X11/rgb.txt
any examples of scripts using this?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2457 Location: Ontario
|
Posted: Thu 02 Aug 2012, 18:32 Post subject:
|
|
puppy backup ---> I put in colored word in front window
bacon recorder --> I put in a info message in color
Radky's apps are the best when it comes to color
see pupshutdown
http://www.murga-linux.com/puppy/viewtopic.php?t=56077
______________________________________________
.
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Sun 05 Aug 2012, 15:34 Post subject:
|
|
Thanks, this method seems a bit 'clunky' - and I keep messing up the syntax.
I want to make different colored buttons, perhaps a different method using sprites would be easier?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2457 Location: Ontario
|
Posted: Tue 07 Aug 2012, 17:08 Post subject:
|
|
Zigbert is experimenting with SVG
in pfind using a technique he learned from Technosaurus
but it's a little too difficult for me to understand .
http://murga-linux.com/puppy/viewtopic.php?t=76431
In bacon recorder I have an animated gif icon that can be clicked on
to launch an app. I made it with mtpaint.
So if you're looking for a fancy button that's the way to go.
___________________________________________
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Tue 07 Aug 2012, 18:22 Post subject:
|
|
sweet, svg files can be used as input ; -) eg
| Code: |
<button relief="2" tooltip-text="pup">
<input file>'/usr/share/images/sm.svg'</input>
<action>echo monkey</action>
</button> |
thanks
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 2457 Location: Ontario
|
Posted: Tue 07 Aug 2012, 18:33 Post subject:
|
|
I think Technosaurus method can control the
individual elements of the image such as straight lines,
arcs, circles etc. Zigbert can then define
things like color opacity size. I wish I knew more
_________________________________________________
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Tue 07 Aug 2012, 22:43 Post subject:
|
|
Svg is very similar to html, only for images. I usually just Google svg + whatever and if it is possible, something will come up on stackoverflow, or even a full tutorial. I posted a bunch of svg line drawings in the simple icon tray thread that could be used and tweaked in inkscapelite (i usually manually adjust inkscape's code for size/readability ... SVG is supposed to be human readable)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Wed 08 Aug 2012, 10:49 Post subject:
|
|
great stuff, gtkdialogue seems to need over complex syntax, but I will fight on ; -)
|
|
Back to top
|
|
 |
|