! 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 !
Frame borders are too thick (Cosmetic enhancement request)
Status:
RESOLVED: MOVED
Priority:
Very Low
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description newhoa 2019-10-14 17:01:28 CEST
Created attachment 9118 
Image of the way borders work before and after the CSS code provided in the initial report.

This is purely cosmetic and trivial but the frame borders around the text view are extra thick, and more so when there are tabs. 

When no tabs are present the left and right borders are doubled, they press against the window border giving it a double border look.

When tabs are present the top and bottom borders are doubled and the left and right borders are tripled.

I'll add a picture to show what I mean. I have managed to fix this with a custom CSS. Mousepad lacks uniquely named CSS style classes so while this works for Mousepad, it messes up many other apps. As a secondary request might MousepadWindow be given a style class name unique to mousepad? Thunar, for example, I can add .thunar before the CSS style and it will only affect Thunar.

Anyway, here is the CSS code I used below. I tested it on my own theme, Adwaita, and Greybird and it seems to work. Maybe it will be of some help so I'll add it.

Again this is super trivial and just an enhancement request. Thanks for the amazing editor!

-------------------------
--------- CSS ---------
-------------------------

/* Hides left and right frame when there are no tabs */

notebook scrolledwindow.frame
{
    margin-left: -1px;
    margin-right: -1px;
}

/* Hides the left border of the first tab when against the window edge */

notebook tabs
{
    margin-left: -1px;
}

/* Removes top, left, right borders when there are tabs */
/* Bottom border moved down so it hides the notebook bottom border */

notebook stack .frame:not(:only-child)
{
    margin-bottom: -1px;
    border-top: none;
    border-left: none;
    border-right: none;
}

/* This is added so above code doesn't affect dialog box */

.dialog-vbox notebook tabs
{
margin-left: 0;
}

/*  Just added some padding between the tab text and close button */

notebook header.top tab button:only-child
{
    margin-left: 5px;
    margin-right: 0;
}
Comment 1 Theo Linkspfeifer editbugs 2019-10-16 02:34:55 CEST
Side note: the proposed change may fix bug 16050 for Mousepad.
Comment 2 Theo Linkspfeifer editbugs 2019-10-17 13:01:58 CEST
I like the idea, but I am not sure how to properly implement this. Would you maybe be able to provide a patch?
Comment 3 Theo Linkspfeifer editbugs 2019-10-17 13:34:59 CEST
Code reference:
https://git.xfce.org/apps/mousepad/tree/mousepad/mousepad-close-button.c#n68
Comment 4 Matthew Brush editbugs 2019-10-17 16:13:08 CEST
I'm really not fond of every application having to add hacks to work around the same issue.
Comment 5 Matthew Brush editbugs 2019-10-18 02:21:49 CEST
(In reply to Matthew Brush from comment #4)
> I'm really not fond of every application having to add hacks to work around
> the same issue.

Sorry, I meant this comment more for #16056, but I guess it applies equally here.
Comment 6 Git Bot editbugs 2020-05-24 01:32:03 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/apps/mousepad/-/issues/33.

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 #16048

Reported by:
newhoa
Reported on: 2019-10-14
Last modified on: 2020-05-24

People

Assignee:
Matthew Brush
CC List:
2 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Additional information