Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-01-28 16:00:51

jakfish
Member
Registered: 2019-12-23
Posts: 28

Frame/Margin Issue

Using Linux Mint 19.3 (xfce) and MS Surface Pro 6, I've got a GTK 3.0 pure-black theme working well, especially due to Aravisian's magnificent help.

https://imgur.com/a/DgGHOoq

As you can see in the screenshot, the calculator has a white margin (or is that a frame?) whereas the Mouse and Touchpad does not. I'm looking to put a 1x white margin/frame around all unmaximized windows (actually, I wouldn't be adverse to playing with same margin around a maximized window).

In /.config/gtk-3.0/gtk.css, I've tried this, but it seems to do nothing:

.window-frame {
  box-shadow: none;
  margin: 1;
}

This frame/margin issue may well be hard-coded--for example, the white box of the Calculator turns red when inactive--but I wanted to check with folks that know more than I do.

Thanks,
Jake

Offline

#2 2020-01-28 17:04:12

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

jakfish wrote:

Using Linux Mint 19.3 (xfce) and MS Surface Pro 6, I've got a GTK 3.0 pure-black theme working well, especially due to Aravisian's magnificent help.

https://imgur.com/a/DgGHOoq

As you can see in the screenshot, the calculator has a white margin (or is that a frame?) whereas the Mouse and Touchpad does not. I'm looking to put a 1x white margin/frame around all unmaximized windows (actually, I wouldn't be adverse to playing with same margin around a maximized window).

In /.config/gtk-3.0/gtk.css, I've tried this, but it seems to do nothing:

.window-frame {
  box-shadow: none;
  margin: 1;
}

This frame/margin issue may well be hard-coded--for example, the white box of the Calculator turns red when inactive--but I wanted to check with folks that know more than I do.

Thanks,
Jake

In your gtk.css, check the following:
decoration
decoration:backdrop
.fullscreen decoration
.tiled decoration
.solid-csd decoration
and so forth, in the same manner which we did before. Look for 1px or light colors.
EDIT: When I have time later, I will look at the copy of your theme I still have.

Last edited by Aravisian (2020-01-28 17:05:59)

Offline

#3 2020-01-28 18:57:51

jakfish
Member
Registered: 2019-12-23
Posts: 28

Re: Frame/Margin Issue

Hi, Aravisian,

Many thanks for weighing in. I did those searches and I don't believe I found anything of importance, except for "decoration" I had already used that in  /.config/gtk-3.0/gtk.css

decoration {
    border: 2px solid #BDBDBD;
    background: #0759EB;
}

which works to give some nice light-gray outlines within the app itself (you can see the lines in Mouse and Touchpad in the imgur).

As for a white frame/margin around the window itself, if the handle exists, I'm missing its jiggle.

Jake

Offline

#4 2020-01-28 19:54:25

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

jakfish wrote:

Hi, Aravisian,

Many thanks for weighing in. I did those searches and I don't believe I found anything of importance, except for "decoration" I had already used that in  /.config/gtk-3.0/gtk.css

decoration {
    border: 2px solid #BDBDBD;
    background: #0759EB;
}

which works to give some nice light-gray outlines within the app itself (you can see the lines in Mouse and Touchpad in the imgur).

As for a white frame/margin around the window itself, if the handle exists, I'm missing its jiggle.

Jake

Had you checked the gtk.css in the gtk-3.20 folder? That is the one I had made most of the changes I made to...
By the way, in this application, "margin" has a specific meaning. Margins are not visible. The margins in this context deal with the invisible spacing around a box.

Last edited by Aravisian (2020-01-28 19:55:45)

Offline

#5 2020-01-28 20:34:35

jakfish
Member
Registered: 2019-12-23
Posts: 28

Re: Frame/Margin Issue

That's the file/directory I searched. Thank you for explaining how "margin" works. I knew I was using it incorrectly.

Jake

Last edited by jakfish (2020-01-28 20:34:50)

Offline

#6 2020-01-28 22:49:53

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

jakfish wrote:

As you can see in the screenshot, the calculator has a white margin

Which calculator is that? xfce? Galculator? Mate Calculator?
I'll install it and see if tweaking some knobs makes it behave.


EDIT:
Batballs! I almost forgot: jakfish, open a terminal and cram into it:

sudo apt-get install gpick

Once installed, open it in whatever manner tickles you the most. A pop up window will open what with the GUi fanciness... and whatever pixel on your screen you hover your mouse over, it will tell you the hex or rgb code for that color. It is Awesome. A great way to find what color is being used, then you can enter that color into your search field of your text editor in your gtk.css to locate where it is being used.

Last edited by Aravisian (2020-01-28 22:52:43)

Offline

#7 2020-01-29 14:50:05

jakfish
Member
Registered: 2019-12-23
Posts: 28

Re: Frame/Margin Issue

As for Calculator, it's a stock feature of Linux Mint 19.3, and in About, it's called: Calculator 3.28.2.

I use gcolor2, similar to gpick, I think, but the search for specific colors chosen by gcolor2 is not yet successful. For instance, the red border of an inactive Calculator is #8A0829, but that doesn't appear in gtk.css. Perhaps it's something hard-coded.

Jake

Offline

#8 2020-01-29 17:07:10

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

Well... hmmm... I downloaded and installed it (gnome calculator) and I cannot duplicate.
bjYbDGE.png
Mine looks quite different, actually.

I have gtk-nocsd installed, which is why my calc has XFWM borders and yours does not.
But the inner frames on mine are black while yours has lines.

Looking at your screenshot, that sure looks like it should fall under "decoration." But I am not seeing anything in the gtk.css.
No, it would not be hard-coded in any way.

Offline

#9 2020-01-29 18:11:19

MrEen
Member
Registered: 2019-04-19
Posts: 244

Re: Frame/Margin Issue

<off-topic>Aravisian, is that a headerbar for Calculator? I noticed it's not following your theme and I have a few windows that are like that and wondered if there's any workaround</off-topic>

Offline

#10 2020-01-29 18:16:54

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

MrEen wrote:

<off-topic>Aravisian, is that a headerbar for Calculator? I noticed it's not following your theme and I have a few windows that are like that and wondered if there's any workaround</off-topic>

MrEen, shoot me an email and we can discuss. aravisian@protonmail.com

And if I understood your question, it was somewhat answered above...

Offline

#11 2020-01-29 19:30:14

jakfish
Member
Registered: 2019-12-23
Posts: 28

Re: Frame/Margin Issue

Well, I feel better now that you can't find it, either smile

To get the terminology correct, we should refer to these lines as "frames," correct?

OR, perhaps they aren't frames at all, but "shadows."

For instance, if you take an unmaximized application and next to it, set up the Appearance/Style, and just scroll through the themes, you can see the outline around the app disappear, reemerge in a different format, or stay the same. I can't tell if that's a shadow, frame, or something else.

Offline

#12 2020-01-29 20:03:05

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

jakfish wrote:

Well, I feel better now that you can't find it, either smile

To get the terminology correct, we should refer to these lines as "frames," correct?

Not in gtk css, no. "Frames" in this sense refers to borders that are -Within a Box.-
Outside borders of a box are called "decoration".

I didn't name 'em.

jakfish wrote:

OR, perhaps they aren't frames at all, but "shadows."

"Shadows" are used in .rc files (or resource files) but in gtk css, it is referred to as "window."
For example, your theme, you might use in constructing a theme:

.window {
     background-image: url("assets/shadow-image.png");
     background-color: #383338;
     color: #FFFFFF;
}

Where you have a Shadow or background image in your assets folder named 'shadow-image.png'.



You MAY try that, actually... in your current theme

.window {
     background-color: #000000;
}

And see what happens at the border...

Last edited by Aravisian (2020-01-29 20:43:40)

Offline

#13 2020-01-30 13:46:02

jakfish
Member
Registered: 2019-12-23
Posts: 28

Re: Frame/Margin Issue

Thank you for the suggestions. I put them into /.config/gtk-3.0/gtk.css but no dice, no change. I did play with "box shadow" in the gtk.css in the 3.2 directory just to see, but no change there, either.

Yeah, I wish the gtk terminology wasn't so obtuse; I think its uninspired vernacular confuses newcomers and many give up, lessening the pool of people that might invent different themes or approaches.

I'm grateful to you for sticking around as I fumble.

Jake

Offline

#14 2020-01-30 14:15:00

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

jakfish wrote:

Yeah, I wish the gtk terminology wasn't so obtuse; I think its uninspired vernacular confuses newcomers and many give up, lessening the pool of people that might invent different themes or approaches.

It always struck me as somewhat amusing how MS products have such absurdly simplistic suggestive names.
MS "Money.
MS "Word" and so on.

So... when Gnome decided to change the name of Nautilus to
"Files"
I couldn't be sure if I was not surprised or... Horrified.

jakfish wrote:

I'm grateful to you for sticking around as I fumble.

Jake

This entire past year I have been fumbling as I try to figure out ways of making my machine be as I want it to be. I can mention many names on this forum that stuck around as I fumbled. If it was not for Misko and Toz and alcornqui.. alcorni.. um... him... I would not have gotten as far as a novice as I have so far. And this should speak to all novices, everywhere.

Offline

#15 2020-02-06 19:50:01

Aravisian
Member
Registered: 2019-08-17
Posts: 406

Re: Frame/Margin Issue

To clarify something my demented brain misunderstood:
The OP is looking to add a White Window border to a black background theme for unmaximized windows. That is, a different appearance to the border depending on whether it is maximized or not.
I have seen it done, but I cannot remember how it was done off the top of my head.
Alternatively, In the window manager settings, you can set it so maximized windows lose their borders- then just set it to always have a white border so that only unmaximized windows show the border.
Many of these tweaks can easily be done in the XFWM4 theme, though if 4.16 gets its way, we will lose that.

Offline

Board footer

Powered by FluxBB