Choose style:

Author Topic: (solved) scroll bar size  (Read 2453 times)

0 Members and 1 Guest are viewing this topic.

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
(solved) scroll bar size
« on: April 11, 2018, 12:09:03 pm »
how does one resize the scroll bar?
« Last Edit: May 05, 2018, 11:26:58 pm by s2 »

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #1 on: April 11, 2018, 12:11:46 pm »
By adjusting the number of pixels in gtkrc file, for gtk-2.0 and gtk-css file for gtk-3.0. Not really straight forward but, possible.

EDIT: What theme do you want to change? Do you want the bars wider or slimmer?
« Last Edit: April 11, 2018, 12:20:22 pm by pin »

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: scroll bar size
« Reply #2 on: April 12, 2018, 06:21:50 am »
wider.
color change if possible.
thanks...

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #3 on: April 12, 2018, 06:47:47 am »
Ok!
I can guide you on "how to" but I need to know in what theme you want to do this.
Color is also possible, pick a color from http://www.color-hex.com/ in the format #xxxxxx

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: scroll bar size
« Reply #4 on: April 12, 2018, 01:23:21 pm »
#000b60 for now.
thanks...

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #5 on: April 12, 2018, 01:25:12 pm »
And what theme?
I might have sometime to look at it tonight!?

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: scroll bar size
« Reply #6 on: April 13, 2018, 04:56:24 am »
unsure of what theme at this time.
something vanilla will work for now.
really just need something so i can learn how to customise the desktop.
thanks much for the help.

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #7 on: April 13, 2018, 05:22:28 am »
First of all a word of warning. Please, understand that if the themes get an update your changes will be overwritten.
That said you can always change it back to your preferred settings when you know how to do it. If you want, you can keep a copy of the relevant files on your home directory for future reference. Also, themes do not get updates that often.  ;)

I'm at work right now and don't have my Peppermint laptop with me. I can do this by tomorrow, unsure if I can find time tonight. Is this ok for you? And it would be so much easier if you pick a theme to change because then I can give you exact commands and lines to change, rather than just <name_of_the_theme_you_want_to_change_HERE> thing  ;)

I'll be back as soon as I can find time for this  8)


Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #8 on: April 14, 2018, 05:04:12 pm »
So, let's do this... Let's start with applications using gtk-2.0.
Open a terminal and type

Code: [Select]
cd /usr/share/themes/

Code: [Select]
ls -l

These are the themes you currently have installed...Let's take the Adwaita theme as an example

Code: [Select]
cd Adwaita

Code: [Select]
ls -l

We are looking for the gtk folders

Code: [Select]
cd gtk-2.0

Code: [Select]
ls -l

I'm on Peppermint 7 and the default text editor is pluma... if you are on Peppermint it will be xed.
To make any changes here you need root permissions.

Code: [Select]
sudo pluma gtkrc

As you can see the colors can be changed here. In some themes, you will be able to change
the scroll bars (or sliders) in this file as well. In other themes, such as this one these settings are located
in another file. Close this file and

Code: [Select]
sudo pluma main.rc

Look for the line GtkRange::slider-width      = 13 and change the value to say, 20?

save and close the file.

Play with pixel value until you are happy with it. You might need to restart for changes to take place.
For gtk-3+ is similar but, the files have different names. Look at these files and let us know if you can't figure out what/where to change the settings.

Note: It's rather useful to have that color link at hand, so that you can quickly check every color stated in these files.

Good luck  ;)

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: scroll bar size
« Reply #9 on: April 14, 2018, 08:07:53 pm »
hey.
i'm on Peppermint 8.
we had a power outage here due to thunderstorm.
i decided on Kokodi as my theme.
the file "/usr/share/themes/Kokodi/gtk-2.0" is not listed.
can i copy and move this file gtk-2.0 from another directory?

thanks...

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #10 on: April 15, 2018, 03:06:03 am »
hey.
i'm on Peppermint 8.
we had a power outage here due to thunderstorm.
i decided on Kokodi as my theme.
the file "/usr/share/themes/Kokodi/gtk-2.0" is not listed.
can i copy and move this file gtk-2.0 from another directory?

thanks...
This one is a window manager theme only. It's a theme for the Xfce window manager, xfwm

Skickat från min SM-G900F via Tapatalk
« Last Edit: April 15, 2018, 03:33:15 am by pin »

Offline s2

  • Jr. Member
  • **
  • Posts: 36
  • Karma: 1
  • New Forum User
    • View Profile
  • Peppermint version(s): 8
Re: scroll bar size
« Reply #11 on: April 15, 2018, 04:40:02 am »
there are no files in the directory Adwaita.
the directory backgrounds  and metacity-1  is all that is listed.

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #12 on: April 15, 2018, 04:51:53 am »
It was just an example.
Pick an existing theme. I'm out all day with my family today.

I'm currently using this theme https://github.com/ddnexus/equilux-theme

If you follow the link you will find the directory tree for this theme here https://github.com/ddnexus/equilux-theme/tree/equilux-dev/src

Look in the gtk folder, look through the files there. You can do this in your web browser.
« Last Edit: April 15, 2018, 05:05:24 am by pin »

Offline pin

  • Trusted User
  • Veteran
  • *****
  • Posts: 1837
  • Karma: 258
    • View Profile
Re: scroll bar size
« Reply #13 on: April 15, 2018, 11:01:19 am »
Ok! Back at home, on my PM7 laptop with a real example this time.
Theme Greybird

Code: [Select]
cd /usr/share/themes/
ls -l
cd Greybird
ls -l
cd gtk-2.0/
sudo pluma gtkrc

look for these lines and change the width to the value you want

Code: [Select]
GtkScale		::slider-width				= 15
GtkScrollbar ::slider-width = 9

save the file and close. Now, back at the terminal

Code: [Select]
cd ..
cd gtk-3.0/
ls -l
sudo pluma gtk-widgets.css

Look for the following section (on this theme it starts at line 1872)

Code: [Select]
/*************
 * scrollbar *
 *************/
.scrollbar {
    border-width: 1px;
    border-style: solid;
    padding: 0;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
    -GtkRange-slider-width: 5px;
    -GtkRange-trough-border: 1px;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) .slider {
    border-radius: 3px;
}

Again, change the values to your desired ones, save and close.

Note, on gtk.css file you can change the color as well.

Hopefully this will help!

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: scroll bar size
« Reply #14 on: April 15, 2018, 12:08:00 pm »
To resize the width of the gtk-3.0 sliders in Greybird, you just have to change the value of:-
Code: [Select]
    -GtkRange-slider-width: 9;
on line 27 of
Code: [Select]
gksudo pluma /usr/share/themes/Greybird/gtk-3.0/gtk-widgets.css



To resize the width of the gtk-2.0 sliders in Greybird, you just have to (as pin suggested) change the value of:-
Code: [Select]
	GtkScrollbar		::slider-width				= 9
on line 63 of
Code: [Select]
gksudo pluma /usr/share/themes/Greybird/gtk-2.0/gtkrc



A problem that may arise from using Greybird is that when you right-click a file and select "Rename" the highlighted text appears white on a white background, so the text seems to disappear.

The fix for this...

Run
Code: [Select]
gksudo pluma /usr/share/themes/Greybird/gtk-3.0/gtk-widgets.css
find line 580, and change it from:
Code: [Select]
    background-color: @theme_base_color;
to
Code: [Select]
    background-color: @selected_bg_color;
and SAVE the file .. then either log off/on, or change theme and change back again.

For clarity, the whole section looks like this
Code: [Select]
.entry:active,
.entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: @theme_base_color;
}
and should now look like this
Code: [Select]
.entry:active,
.entry:focus {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: @selected_bg_color;
}
« Last Edit: April 15, 2018, 12:27:13 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec