https://bugs.kde.org/show_bug.cgi?id=527354

            Bug ID: 527354
           Summary: The editor context menus appear **transparent** (with
                    no solid background) when using a color scheme that
                    has alpha channels (translucent schemes). The menu
                    blends into the note text, making items hard to read
                    and to locate.
    Classification: Applications
           Product: Marknote
      Version First 1.6.0
       Reported In:
          Platform: Garuda Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

Created attachment 197293
  --> https://bugs.kde.org/attachment.cgi?id=197293&action=edit
Adds a solid background to the editor context menus, which currently appear
transparent on color schemes with alpha.

# Bug Report

**Product:** Marknote  
**Component:** Editor (context menus: `TextFieldContextMenu` and
`BlockContextMenu`)  
**Version:** 1.6.0 and current master  
**Type:** Visual bug / readability

## Summary

The editor context menus appear **transparent** (with no solid background) when
using a color scheme that has alpha channels (translucent schemes). The menu
blends into the note text, making items hard to read and to locate.

## Steps to reproduce

1. Use a color scheme whose background carries alpha (e.g. `BackgroundNormal`
with alpha < 255).
1. Open a note with text in Marknote.
1. Right-click on the text **while editing** (the Cut/Copy/Paste menu) — or on
a block while not editing.
1. Observe that the context menu is see-through, with no background, blending
into the content.

## Observed behavior

The menu declares no `background`. The control style (`org.kde.darkly`,
`Menu.qml:98`) fills the background with `Kirigami.Theme.backgroundColor`,
which **preserves the alpha channel of the color scheme**. On translucent
schemes the result is an almost invisible menu on top of the text.

## Expected behavior

The context menu should have an **opaque** background that stays readable over
any content, following the theme colors (RGB), with a border and rounded
corners.

## Fix

Explicitly declare a `background` on both menus, using the theme RGB but
**forcing the alpha to 1.0**, so the menu stays legible even on translucent
schemes:

```qml
background: Rectangle {
    color: Qt.rgba(Kirigami.Theme.backgroundColor.r,
                   Kirigami.Theme.backgroundColor.g,
                   Kirigami.Theme.backgroundColor.b,
                   1.0)
    border.color: Kirigami.Theme.separatorColor
    border.width: 1
    radius: Kirigami.Units.smallSpacing
}
```

Files: `src/qml/TextFieldContextMenu.qml` and `src/qml/BlockContextMenu.qml`
(the latter also needs `import org.kde.kirigami as Kirigami`).

## Note

On opaque schemes the defect does not show, since the default alpha is already
255. It becomes obvious on translucent schemes — an increasingly common setup
in Plasma.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to