button sizing, sun vs sgi [message #6910] |
Tue, 03 September 1996 00:00  |
Jeff Hall
Messages: 7 Registered: September 1996
|
Junior Member |
|
|
I have developed an application on a Sun/Solaris,
but when I run it on an SGI the buttons and text
in the buttons are too big.
There is also a sizing problem on the PowerMac.
How can I control the button & font size of the
widgets on the different platforms?
|
|
|
Re: button sizing, sun vs sgi [message #6981 is a reply to message #6910] |
Thu, 05 September 1996 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Jeff Hall wrote:
>
> I have developed an application on a Sun/Solaris,
> but when I run it on an SGI the buttons and text
> in the buttons are too big.
>
> There is also a sizing problem on the PowerMac.
>
> How can I control the button & font size of the
> widgets on the different platforms?
Here are the changes I had to make when I ported our Solaris-happy
IDL programs to an SGI machine:
The following are changes necessary when porting this software to
a Silicon Graphics machine running IRIX 5.2 (put these commands in
your idl_startup file):
; Choose pseudo-color 8-bit visual
device, pseudo_color=8
; Select default backing-store method to be provided by IDL, as SGI
; X server does not seem to provide it
device, retain=2
; Change size of font so programs fit on-screen (IRIX 4.0 or later)
; Reference: sgi.doc document in $IDL_DIR/notes
WIDGET_CONTROL, $
DEFAULT_FONT="-adobe-helvetica-bold-r-normal-*-14-100-*-*-*-*-* "
; Set default plotting font to same hardware font above
; (Create a pixmap window to avoid window creation upon
; calling DEVICE, FONT= ; then delete window)
window, xsize=5,ysize=5,/free,/pixmap
!p.font = 0 ; Use hardware font
device, FONT="-adobe-helvetica-bold-r-normal-*-10-100-*-*-*-*-*"
wdelete ; Delete window created
Hope this helps.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
[ UCSD Mail Code 0949 ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|
Re: button sizing, sun vs sgi [message #6999 is a reply to message #6910] |
Wed, 04 September 1996 00:00  |
Tim Patterson
Messages: 65 Registered: October 1995
|
Member |
|
|
Jeff Hall wrote:
>
> I have developed an application on a Sun/Solaris,
> but when I run it on an SGI the buttons and text
> in the buttons are too big.
>
> There is also a sizing problem on the PowerMac.
>
> How can I control the button & font size of the
> widgets on the different platforms?
Sounds like something similar to the problem I was having
with different machines having different resolution fonts.
You can specify the font to be used for widgets (look
in the docs for the exact method), but the trick is knowing
which font point size to use.
My solution was:
The user can define a specified environment variable to
be either 10,12 or 14. If this env. var. exists and has
a sensible value, then that's the font size I use for
the widgets.
If the variable isn't set up properly, then I check the
value of !d.y_ch_size. If this is less than 10, then I
set the font size to 12, otherwise I set it to 10. This
appears to work and keep the widgets reasonably to a
similar size on 100 dpi and 75 dpi font workstations.
Tim
|
|
|