! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Feature request] Add "button_vertical_offset" to themerc (and more)
Status:
RESOLVED: MOVED
Severity:
enhancement
Component:
Decorations

Comments

Description Spass 2018-06-21 00:07:57 CEST
Created attachment 7806 
screenshot of a theme

Hello. I've recently created a simple theme for Xfwm4 and I have two suggestions that would help the theme creators a lot.

1) Add "button_vertical_offset=X" (default to 0) option to the themerc configuration file to make it easier to position the buttons where they should be. The workaround now is making the button image taller with some transparency on top.
2) Add an option to cut/crop/hide X pixels from the top of the titlebar when window is maximized. Something like "maximized_crop=X" (default to 0) option.

To explain it a bit more - first take a look at this theme - https://www.xfce-look.org/p/1242107/
Like you can see, the theme has thick (5px) border around the window and the titlebar. To position the window buttons lower I had to add some "empty space" on top of the image files, to lower them. I assume they just get centered vertically as a default behaviour.

Explaining 2) - On that theme, on maximized windows, the top coloured border is still visible, while the side and bottom ones are hidden. It would be nice if I could cut some of the titlebar when the window is maximized, to hide that unwanted frame (element of the image file). So for example "maximized_crop=5" would hide the top 5 pixels of the titlebar when the window gets maximized.

Xubuntu 17.10, Xfwm 4.12.4
Comment 1 AK 2019-05-02 07:51:07 CEST
Created attachment 8472 
Patch for cropping the top of the frame when maximized

I came up with this patch to fix the issue where the top of the border is not cropped off. Based off the latest commit from the XFWM4 git repository, but I'm sure it can be adapted to XFWM 4.12 if needed.

It won't break existing themes, and your theme can just have "frame_border_top=5" added to the themerc file. Existing XFWM4 will ignore this, and the patched XFWM4 will make your theme look the way it should.

It will not crop the top border if XFWM4 is setup to show the borders when maximized.

The patch doesn't implement the "button_vertical_offset" feature but I did notice that the code will centre the button vertically, you may want to look into just making the button images very small.
Comment 2 AK 2019-05-02 07:56:53 CEST
> The patch doesn't implement the "button_vertical_offset" feature but I did
> notice that the code will centre the button vertically, you may want to look
> into just making the button images very small.

Nevermind that, I didn't realise you mentioned that you thought it would do that. Perhaps it doesn't do that on XFWM 4.12 but I haven't really checked. I know the code is there in the master (development branch?) though.
Comment 3 AK 2019-05-02 13:15:49 CEST
Created attachment 8475 
Same cropping patch FOR XFWM 4.12 ONLY

Same cropping patch as 8472, but for XFWM 4.12 only.
Use "git apply -v3 xfwm412.diff" to apply to the xfwm4-4.12.0 to xfwm4-4.12.3 tags.
Applies cleanly without "-v3" on the 4.12.4 and 4.12.5 releases.
Comment 4 Olivier Fourdan editbugs 2019-05-18 18:30:49 CEST
Can you please submit your patch as a "git format-patch" against the master branch, using a real name and signed off?
Comment 5 AK 2019-05-21 11:35:47 CEST
How do I submit such a patch? I run "git format-patch" as you say and it does nothing.
Comment 6 AK 2019-05-21 11:45:41 CEST
(In reply to Olivier Fourdan from comment #4)
> Can you please submit your patch as a "git format-patch" against the master
> branch, using a real name and signed off?
I can't get "git format-patch" working but I can confirm that the patch I submitted here merges cleanly with the current master: cbd927470e71227a9299a2aea2dee21dd4faf74a
Comment 7 AK 2019-05-21 13:17:35 CEST
Created attachment 8561 
git format-patch

Patch in "git format-patch" form.
Comment 8 Olivier Fourdan editbugs 2019-05-21 13:24:31 CEST
Thanks, but I'm somehow surprised "AK47" is your real name.

It's also missing the sign-off-by and the bug number. Please have a look at "git log" to see the common commit format.
Comment 9 AK 2019-05-21 13:56:51 CEST
Olivier Fourdan from comment #8)
> Thanks, but I'm somehow surprised "AK47" is your real name.
> It's also missing the sign-off-by and the bug number. Please have a look at
> "git log" to see the common commit format.

So what format do you want. I'm confused about the sign off, isn't that meant for developers? Something similar to this:

commit 58dcef04b4737ec9871a312567923334d36b50fb
Author: David Siroky <siroky@dasir.cz>
Date:   Wed Dec 20 10:33:44 2017 +0100

    Raise window while cycling
    
    Bug: 2701
    
    Optionally raise the window being considered while cycling.

Like:

commit XXXXX
Author: AK <chkboom@safe-mail.net>

   Allow the top of the frame to be cropped when maximised.

   Bug: 14470

   Themes can take advantage of this with the frame_border_top property.
   Existing themes without that property will not be affected or broken.
Comment 10 AK 2019-05-21 14:23:43 CEST
Created attachment 8562 
git format-patch round 2
Comment 11 AK 2019-05-21 14:45:18 CEST
Created attachment 8563 
Fixed "double_DOUBLE_CLICKclick_distance" check.
Comment 12 AK 2019-05-21 14:53:51 CEST
Created attachment 8564 
Fixed double-click distance setting.
Comment 13 Git Bot editbugs 2019-05-21 22:01:32 CEST
Adam K referenced this bugreport in commit bf41e461abe520d20cf2022e697cd38bc28867e8

frame: Allow the top of the frame to be cropped when maximised

https://git.xfce.org/xfce/xfwm4/commit?id=bf41e461abe520d20cf2022e697cd38bc28867e8
Comment 14 Git Bot editbugs 2020-05-29 12:21:22 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfwm4/-/issues/291.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14470

Reported by:
Spass
Reported on: 2018-06-21
Last modified on: 2020-05-29

People

Assignee:
Olivier Fourdan
CC List:
1 user

Version

Version:
4.12.0

Attachments

Additional information