Bug 404045

Summary: line-h.png border issue
Product: [Plasma] Breeze Reporter: Milkii B <kde>
Component: gtk themeAssignee: scionicspectre
Status: RESOLVED FIXED    
Severity: crash CC: nate, val.zapod.vz
Priority: NOR    
Version: 5.15.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.17.0
Sentry Crash Report:

Description Milkii B 2019-02-06 23:36:50 UTC
SUMMARY

- https://github.com/ahlstromcj/sequencer64/issues/126
- https://github.com/ahlstromcj/sequencer64/issues/154


STEPS TO REPRODUCE
1. install extra/breeze-gtk on Arch Linux
2. install sequencer64 - https://github.com/ahlstromcj/sequencer64 - GTK build not Qt
3. Click on file menu

OBSERVED RESULT

application crashes due to mismatched theme details

EXPECTED RESULT

file menu opens and displays separator graphics


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch + Sway


ADDITIONAL INFORMATION

"the border setting for the menu separator line doesn't work with the 20x1 pixel line-h.png file ... second occurrence of '../assets/line-h.png', in the 'separator_menu_item' section"
Comment 1 Milkii B 2019-02-06 23:38:00 UTC
"** (seq64:25277): WARNING **: Invalid borders specified for theme pixmap:
         /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,"
Comment 2 Nate Graham 2019-02-07 17:55:48 UTC
Can you check again with the upcoming Plasma 5.15.0, which is scheduled for release in five days? The Breeze GTk theme code was rewritten to be more reliable.
Comment 3 Milkii B 2019-02-15 03:22:59 UTC
No, I don't think the latest revision of the theme resolves this.

I have found an easier way to test - using lxappearance, the LXDE theme chooser.

If I run lxappearance from the terminal, then select the Breeze themes available there, then click to open a menu in the widget preview, I get terminal output noting the issue;


** (lxappearance:29370): WARNING **: 03:10:15.808: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze-dark-gtk/gtk-2.0/../assets/line-h.png,
borders don't fit within the image

** (lxappearance:29370): WARNING **: 03:10:30.283: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze-gtk/gtk-2.0/../assets/line-h.png,
borders don't fit within the image

** (lxappearance:29370): WARNING **: 03:10:23.844: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze-Dark/gtk-2.0/../assets/line-h.png,
borders don't fit within the image

** (lxappearance:29370): WARNING **: 03:10:27.163: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,
borders don't fit within the image


The top two there are breeze-gtk-git, the official one, and the bottom two are from gnome-breeze-git, which I think is a fork. The times in the output are switched around because I reordered them for the context of this thread.

https://aur.archlinux.org/packages/breeze-gtk-git/

https://aur.archlinux.org/packages/gnome-breeze-git/
Comment 4 Nate Graham 2019-02-15 16:16:12 UTC
Darn. Thanks for checking!
Comment 5 ZBalling 2019-06-16 02:21:07 UTC
Hello! I know how to solve a problem.
In /usr/share/themes/Breeze/gtk-2.0/widgets/menu (in my case, include "widgets/menu" was in /usr/share/themes/Breeze/gtk-2.0/gtkrc)

style "separator_menu_item"
{
    engine "pixmap"
    {
        image
        {
            function            = BOX
              file              = "../assets/line-h.png"
              border            = { 1, 1, 1, 1 }
              stretch         = TRUE
        }
    }
}

Should be

              border            = { 0, 0, 0, 0 }


Than the problem vanishes. I use debian 10 Buster with breeze-gtk-theme 5.14.5-1
Also please open bug in debian. 
https://packages.debian.org/buster/breeze-gtk-theme
Thank you.
Comment 6 Nate Graham 2019-06-16 15:58:59 UTC
Thanks for figuring it out! Would you be willing to submit a patch? It's very easy: https://community.kde.org/Infrastructure/Phabricator#Posting_a_Patch_using_the_website
Comment 7 ZBalling 2019-06-17 04:44:24 UTC
This one is wrong.
https://cgit.kde.org/breeze-gtk.git/tree/src/gtk2/widgets/menu#n274

Listen, do you know anybody from https://cgit.kde.org/breeze-gtk.git/log/  ?

Can you ask them, maybe border should be some other value? Not all 0s.
Comment 8 Nate Graham 2019-06-17 04:45:54 UTC
Yes, I know pretty much all of them. I would recommend submitting a patch and adding "[RFC]" to the title. I can make sure it gets some attention.
Comment 9 ZBalling 2019-06-17 05:26:21 UTC
Ready

https://phabricator.kde.org/D21869

By the way, in my case I have this problem problem with gnuradio-companion if I press "File" or "View": those menus have horizontal separators in them.
Comment 10 Nate Graham 2019-06-19 08:13:50 UTC
Git commit 71eed8b3ad50d956616213632c9ecb536ae6fc7b by Nate Graham, on behalf of Valerii Zapod.
Committed on 19/06/2019 at 08:01.
Pushed by ngraham into branch 'master'.

Border for "separator_menu_item" should be 0

Summary:
This revision aims to fix a crash in Sequencer64 (and possibly other apps) with this message:

```
(seq64:25899): WARNING **: 09:40:24.716: Invalid borders specified for theme pixmap:
        /usr/share/themes/Breeze/gtk-2.0/../assets/line-h.png,
borders don't fit within the image
```

Test Plan: No visual changes nor crashes in other apps.

Reviewers: #breeze, mthw, gepardo, jackg, ngraham

Reviewed By: #breeze, mthw, ngraham

Subscribers: ngraham, zzag, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21869

M  +1    -1    src/gtk2/widgets/menu

https://commits.kde.org/breeze-gtk/71eed8b3ad50d956616213632c9ecb536ae6fc7b