Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-12-14 19:36:38

RaySurf
Member
Registered: 2024-10-28
Posts: 15
LinuxChrome 131.0

[SOLVED] Is there a way to add padding inside Mousepad?

in a Mousepad document the text is hard up against the left edge

Is there a way to add some padding?

Last edited by RaySurf (2024-12-17 13:25:44)

Offline

#2 2024-12-15 00:42:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Which version of mousepad?

Try:

.mousepad .sourceview {padding-left: 10px;}

...in ~/.config/gtk-3.0/gtk.css.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-12-15 19:43:00

RaySurf
Member
Registered: 2024-10-28
Posts: 15
LinuxChrome 131.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

ToZ wrote:

Which version of mousepad?

Try:

.mousepad .sourceview {padding-left: 10px;}

...in ~/.config/gtk-3.0/gtk.css.

great thanks... that did someting

it put some padding inside the row number side bar, but it still helps, thanks


Mousepad 0.5.10 (on debian bookworm)

oh, just realised the latest release is 0.6.3 released (2024/10/21 12:18)

edit: actually the padding is between the row numbers and the text, it just looked like it was part of the numbers bar because of my colour theme

Last edited by RaySurf (2024-12-15 21:46:12)

Offline

#4 2024-12-16 10:51:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

You can also specify a background colour if you want to change it to be the same colour as the sourceview window:

.mousepad .sourceview {padding-left: 10px; background-color: red}

...change "red" to whatever colour name or #rrggbb matches.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2024-12-16 20:25:25

Clio
Member
Registered: 2011-01-25
Posts: 109
LinuxFirefox 134.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

I am also interested in a small adjustment in mousepad. Is it possible to insert a space between the line numbers and the actual text?
3-4 px would be enough, then it would be easier to place the cursor in front of the beginning of a line.
Thanks in advance and regards

Offline

#6 2024-12-17 01:07:50

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Clio wrote:

I am also interested in a small adjustment in mousepad. Is it possible to insert a space between the line numbers and the actual text?
3-4 px would be enough, then it would be easier to place the cursor in front of the beginning of a line.
Thanks in advance and regards

Does the above work for this use case? It puts padding between the line numbers and the text.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2024-12-17 11:13:10

RaySurf
Member
Registered: 2024-10-28
Posts: 15
LinuxChrome 131.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

ToZ wrote:

You can also specify a background colour if you want to change it to be the same colour as the sourceview window:

.mousepad .sourceview {padding-left: 10px; background-color: red}

...change "red" to whatever colour name or #rrggbb matches.

it looks like any file that is longer (number of lines) than what will fit inside the open window, will show the margin padding with just black background color

if the file number of lines is less than what fits in the window height, then the padding background color works fine

Last edited by RaySurf (2024-12-17 12:38:59)

Offline

#8 2024-12-24 16:29:13

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Any way to remove the black color for files with large number of rows (lines)?

Offline

#9 2024-12-24 18:20:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Are you referring to the background colour of the line numbers column? If so,

.sourceview border {background-color: red;}

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2024-12-24 19:33:35

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

The black strip is just to the right of the line numbers column.

Offline

#11 2024-12-24 19:35:53

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

If you've used the tweak above, then I don't see a way to do that. If something else, can you post a screenshot?


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#12 2024-12-24 20:54:17

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Offline

#13 2024-12-25 02:02:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

That's odd.
What version of mousepad are you running and can you post back the contents of your ~/.config/gtk-3.0/gtk.css? I can't replicate this on the latest version.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#14 2024-12-25 02:44:57

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

~/.config/gtk-3.0/gtk.css

@import 'colors.css';
.mousepad .sourceview {padding-left: 10px;}
.mousepad .sourceview {padding-left: 10px; background-color: #FFFFFF}

also, mousepad 0.6.1

Offline

#15 2024-12-25 11:38:35

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

What "Color Scheme" are you using and if you change color schemes does the problem persist?

Can you try with the first line of that snippet removed?

And if still nothing, try the following:

.mousepad .sourceview {padding-left: 10px;}
.mousepad .sourceview {padding-left: 10px; background-color: rgba(255,255,255,0.0);}

...or:

.mousepad .sourceview {padding-left: 10px;}
.mousepad .sourceview {padding-left: 10px; background-color: rgba(255,255,255,0.0);}

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#16 2024-12-25 19:46:02

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Not using any color scheme. Changed scheme to classic but problem persists.

Tried your suggestions for changes to ~/.config/gtk-3.0/gtk.css but problem persists.

Offline

#17 2024-12-26 02:40:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

Hmmm. I rebuilt 0.6.1 from source and can replicate the issue. I'm not sure what commit fixed it, but it no longer exists in 0.6.3.

Edit: Now that I've rebuilt 0,6,3, I can see the problem. This is odd.

Try this:

.mousepad .sourceview {padding: 10px}
.mousepad .sourceview text {background-color: rgba(255,255,255,.99)}

Last edited by ToZ (2024-12-26 02:57:15)


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#18 2024-12-26 21:05:51

daniewicz
Member
Registered: 2024-12-12
Posts: 25
LinuxFirefox 128.0

Re: [SOLVED] Is there a way to add padding inside Mousepad?

That worked ToZ. Thanks for your effort!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 7 queries executed - Memory usage: 631.77 KiB (Peak: 664.61 KiB) ]