unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gtk narrow scrollbars (no trough)
@ 2011-10-27  4:06 Scott Jaderholm
  2011-10-27  6:17 ` Jan D.
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Jaderholm @ 2011-10-27  4:06 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

Is there a way to change the width of gtk scrollbars in Emacs? Or better
yet, have them respect the .gtkrc?

I've changed the slider-width and trough-border in .gtkrc which makes my
scrollbars narrower in everything but Emacs. It appears that regardless of
.gtkrc the scrollbars are the same width, and though it will make the slider
narrow, it will still use the extra space as trough, even if you set that to
0 in gtkrc.

Scott

[-- Attachment #2: Type: text/html, Size: 468 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gtk narrow scrollbars (no trough)
  2011-10-27  4:06 gtk narrow scrollbars (no trough) Scott Jaderholm
@ 2011-10-27  6:17 ` Jan D.
  2011-10-28 15:22   ` Chong Yidong
  0 siblings, 1 reply; 6+ messages in thread
From: Jan D. @ 2011-10-27  6:17 UTC (permalink / raw)
  To: Scott Jaderholm; +Cc: emacs-devel

Scott Jaderholm skrev 2011-10-27 06:06:
> Is there a way to change the width of gtk scrollbars in Emacs? Or better
> yet, have them respect the .gtkrc?
>
> I've changed the slider-width and trough-border in .gtkrc which makes my
> scrollbars narrower in everything but Emacs. It appears that regardless
> of .gtkrc the scrollbars are the same width, and though it will make the
> slider narrow, it will still use the extra space as trough, even if you
> set that to 0 in gtkrc.

Hello.

Can you give a screenshot?  I think scrollbar width must be the same 
width as character width.  This simplifies things when you have two 
windows next to each other and a scroll bar between them.

	Jan D.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gtk narrow scrollbars (no trough)
  2011-10-27  6:17 ` Jan D.
@ 2011-10-28 15:22   ` Chong Yidong
  2011-10-30 20:43     ` Jan Djärv
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2011-10-28 15:22 UTC (permalink / raw)
  To: Jan D.; +Cc: Scott Jaderholm, emacs-devel

"Jan D." <jan.h.d@swipnet.se> writes:

> Can you give a screenshot?  I think scrollbar width must be the same
> width as character width.  This simplifies things when you have two
> windows next to each other and a scroll bar between them.

You should be able to see the issue with

 (set-frame-parameter nil 'scroll-bar-width 100)
 (set-frame-parameter nil 'scroll-bar-width 10)

Emacs 23 appears to have the same problem.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gtk narrow scrollbars (no trough)
  2011-10-28 15:22   ` Chong Yidong
@ 2011-10-30 20:43     ` Jan Djärv
  2011-11-04 22:47       ` Scott Jaderholm
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Djärv @ 2011-10-30 20:43 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Scott Jaderholm, emacs-devel

Hi.

28 okt 2011 kl. 17:22 skrev Chong Yidong:

> "Jan D." <jan.h.d@swipnet.se> writes:
> 
>> Can you give a screenshot?  I think scrollbar width must be the same
>> width as character width.  This simplifies things when you have two
>> windows next to each other and a scroll bar between them.
> 
> You should be able to see the issue with
> 
> (set-frame-parameter nil 'scroll-bar-width 100)
> (set-frame-parameter nil 'scroll-bar-width 10)
> 
> Emacs 23 appears to have the same problem.


This is not the same thing as what the OP said.  He changed the theme values, the above only change the Emacs values.
Most theme scroll bars can not be resized.  So Emacs always use the theme values for the scroll bars.  So if the theme values changes, Emacs should use them.

But the OP didn't say which Gtk+ version, which theme and which Emacs version he was using.
This was updated when bug#8505 was fixed.

	Jan D.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gtk narrow scrollbars (no trough)
  2011-10-30 20:43     ` Jan Djärv
@ 2011-11-04 22:47       ` Scott Jaderholm
  2011-11-06 17:47         ` Jan Djärv
  0 siblings, 1 reply; 6+ messages in thread
From: Scott Jaderholm @ 2011-11-04 22:47 UTC (permalink / raw)
  To: Jan Djärv; +Cc: Chong Yidong, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1983 bytes --]

On Sun, Oct 30, 2011 at 4:43 PM, Jan Djärv <jan.h.d@swipnet.se> wrote:

> Hi.
>
> 28 okt 2011 kl. 17:22 skrev Chong Yidong:
>
> > "Jan D." <jan.h.d@swipnet.se> writes:
> >
> >> Can you give a screenshot?  I think scrollbar width must be the same
> >> width as character width.  This simplifies things when you have two
> >> windows next to each other and a scroll bar between them.
> >
> > You should be able to see the issue with
> >
> > (set-frame-parameter nil 'scroll-bar-width 100)
> > (set-frame-parameter nil 'scroll-bar-width 10)
> >
> > Emacs 23 appears to have the same problem.
>
>
> Thanks Jan for following up on these even after I failed to provide a
screenshot.


>  This is not the same thing as what the OP said.  He changed the theme
> values, the above only change the Emacs values.
> Most theme scroll bars can not be resized.  So Emacs always use the theme
> values for the scroll bars.  So if the theme values changes, Emacs should
> use them.
>
> But the OP didn't say which Gtk+ version, which theme and which Emacs
> version he was using.
>

 GNU Emacs 24.0.90.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of
2011-11-03 on lychee, modified by Debian

Gtk theme is Murrine Brave Dark.

I modified these lines in gtkrc

    GtkRange       ::slider-width        = 10 # Scrollbar width.
    GtkRange       ::stepper-size        = 0 # Stepper height.

This is what the scrollbars look like in most other apps:

http://jaderholm.com/tmp/2011-11-04-scroll1.png

(though Gedit and Gvim both display them wrong)

This is what they look like in Emacs by default:

http://jaderholm.com/tmp/2011-11-04-scroll2.png

Note that the slider is the right width, it's just the trough that is wrong.

If I use (add-to-list 'default-frame-alist '(scroll-bar-width . 10)) then
they look correct:

http://jaderholm.com/tmp/2011-11-04-scroll3.png

I've seen this in other themes that I haven't modified myself.

Scott

[-- Attachment #2: Type: text/html, Size: 2873 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gtk narrow scrollbars (no trough)
  2011-11-04 22:47       ` Scott Jaderholm
@ 2011-11-06 17:47         ` Jan Djärv
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Djärv @ 2011-11-06 17:47 UTC (permalink / raw)
  To: Scott Jaderholm; +Cc: Chong Yidong, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]


4 nov 2011 kl. 23:47 skrev Scott Jaderholm:

> 
> 
>  GNU Emacs 24.0.90.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2011-11-03 on lychee, modified by Debian
> 
> Gtk theme is Murrine Brave Dark.
> 
> I modified these lines in gtkrc
> 
>     GtkRange       ::slider-width        = 10 # Scrollbar width.
>     GtkRange       ::stepper-size        = 0 # Stepper height.
> 
> This is what the scrollbars look like in most other apps:
> 
> http://jaderholm.com/tmp/2011-11-04-scroll1.png
> 
> (though Gedit and Gvim both display them wrong)
> 
> This is what they look like in Emacs by default:
> 
> http://jaderholm.com/tmp/2011-11-04-scroll2.png
> 
> Note that the slider is the right width, it's just the trough that is wrong.
> 
> If I use (add-to-list 'default-frame-alist '(scroll-bar-width . 10)) then they look correct:
> 
> http://jaderholm.com/tmp/2011-11-04-scroll3.png
> 
> I've seen this in other themes that I haven't modified myself.
> 

When I modify Murrine Brave Dark as described above, I do get smaller scroll bars in Emacs.  The scroll bars in gnome-terminal and Emacs look exactly the same.  But this also depends on font size.  Emacs pads the scroll bar to a multiple of the font size.  That is because if you do a C-x 3 there is nothing to take up the slack if the scroll bar is different from the character width.

I don't think there is a bug here. This is a known limitation in Emacs, and so far there has been no work into remove it.

	Jan D.


[-- Attachment #2: Type: text/html, Size: 2579 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-06 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27  4:06 gtk narrow scrollbars (no trough) Scott Jaderholm
2011-10-27  6:17 ` Jan D.
2011-10-28 15:22   ` Chong Yidong
2011-10-30 20:43     ` Jan Djärv
2011-11-04 22:47       ` Scott Jaderholm
2011-11-06 17:47         ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).