Bug 695198 - x11 device scroll bars
Summary: x11 device scroll bars
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Other Driver (show other bugs)
Version: master
Hardware: PC Linux
: P4 enhancement
Assignee: Henry Stiles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-01 10:36 UTC by James Cloos
Modified: 2023-05-23 16:05 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Cloos 2014-05-01 10:36:33 UTC
I have it linking with libXaw and just need to put the pixels in the interior widget.

The only question is:

Do you want the existing UI to continue by default, and only show scroll bars if the -r and/or -g options specify a page with too many pixels to fit w/o scrolling?

Or should the default be some specific -r?
Comment 1 Henry Stiles 2014-05-01 13:58:25 UTC
(In reply to comment #0)
> I have it linking with libXaw and just need to put the pixels in the
> interior widget.
> 
> The only question is:
> 
> Do you want the existing UI to continue by default, and only show scroll
> bars if the -r and/or -g options specify a page with too many pixels to fit
> w/o scrolling?
> 
> Or should the default be some specific -r?

The first one sounds right to me, but I'm a bit confused this should have nothing to do with -r and -g per se.  A job can specify ledger paper for example and that overflows most displays with the default resolution without setting the -r or -g option.  All that matters is the extant and density of the job and the frame size within the X11 device. 

The X11 device's default resolution is device dependent also.  I don't know if that is a particularly good decision and if it affects how you've done things.  If it's easier to change that I think it can safely default to 96 or something reasonable
Comment 2 James Cloos 2014-05-01 16:39:47 UTC
> A job can specify ledger paper for example

I worded that poorly; I meant -g as shorthand for any specification of paper size.
Comment 3 Hin-Tak Leung 2014-05-01 20:05:25 UTC
(In reply to comment #0)
> Do you want the existing UI to continue by default, and only show scroll
> bars if the -r and/or -g options specify a page with too many pixels to fit
> w/o scrolling?

It should just do the sensible thing - put the scroll bars in when the rendered pixel size (minus adjustments of a dozen pixels for typical scroll bar width)
is larger than screen size.

There is already code in the x11 device to detect current screen size. The rendered pixel size is just the resolution x paper size (both of those are separately available, if the rendered pixel size itself is not already available).
Comment 4 James Cloos 2014-06-24 12:38:16 UTC
To update this:

Between the archaeology on Xt and Xaw, some modifications better to see what the code was doing, and trial & error this has taken quite a bit longer than I expected.

It is still not there yet, but I have the overall logic done and continue to work on getting the details right.

Hopefully it won’t take much longer.