DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Segmented button: selected middle item gets rounded corners instead of rectangular edges

Open wowo101 opened this issue 7 months ago • 2 comments

Description

In segmented button / tab-like selection widgets, the selected option receives fully rounded corners regardless of its position. Middle items should have rectangular (straight) edges on their left and right sides—only the leftmost and rightmost items in the group should have rounded corners on their outer edges.

Expected behaviour

  • First item: rounded left corners, straight right edge
  • Middle items: straight edges on both sides (even when selected)
  • Last item: straight left edge, rounded right corners

Actual behaviour

When a middle item is selected, it gets rounded corners on all sides, breaking the continuous shape of the segmented control.

Environment

  • DMS via CachyOS packages
  • Niri 25.11
Image

wowo101 avatar Apr 05 '26 00:04 wowo101

Given the way the code is written, I think it's by design. https://github.com/AvengeMedia/dank-qml-common/blob/0de254e8dde48af44bd3411f625a930ce47cf136/DankCommon/Widgets/DankButtonGroup.qml#L154

However I agree that it's not intuitive and it might be nice to add an option to disable the rounding on the selected option.

TheLastOperator avatar Sep 21 '26 13:09 TheLastOperator

Done in https://github.com/duxlabs-dev/dux-qml-common/commit/13d44a098a077a033ce7bab9128e03ba99f44540 (feat(shape): classic interface style & fixed radius cap).

bbedward avatar Oct 28 '26 23:10 bbedward