Skip to content

Commit

Permalink
Limit light selection to "widget-colored" widgets only (#11358)
Browse files Browse the repository at this point in the history
Fixes #10862

Before, we set selection to whit on entire node, but this looked bad in Table Widget.

[Screencast From 2024-10-18 15-23-40.webm](https://github.com/user-attachments/assets/cdc3e5f0-05f3-4858-ac98-c634ca283244)
  • Loading branch information
farmaazon authored Oct 21, 2024
1 parent 5faddf5 commit 7718734
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
- [Rows and Columns may be now reordered by dragging in Table Input
Widget][11271]
- [Copying and pasting in Table Editor Widget now works properly][11332]
- [Fix invisible selection in Table Input Widget][11358]

[11151]: https://github.com/enso-org/enso/pull/11151
[11271]: https://github.com/enso-org/enso/pull/11271
[11332]: https://github.com/enso-org/enso/pull/11332
[11358]: https://github.com/enso-org/enso/pull/11358

#### Enso Standard Library

Expand Down
1 change: 1 addition & 0 deletions app/gui/src/project-view/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
--color-widget: rgb(255 255 255 / 0.12);
--color-widget-focus: rgb(255 255 255 / 0.25);
--color-widget-selected: rgb(255 255 255 / 0.58);
--color-widget-selection: rgba(255 255 255 / 0.2);
--color-port-connected: rgb(255 255 255 / 0.15);

/* colors for specific icons */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,4 @@ const graphNodeSelections = shallowRef<HTMLElement>()
contain: layout size style;
will-change: transform;
}
.layer:deep(::selection) {
background-color: rgba(255, 255, 255, 20%);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,9 @@ export const widgetDefinition = defineWidget(
outline: none;
background: var(--color-widget-focus);
}
&:deep(::selection) {
background: var(--color-widget-selection);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ defineExpose({
&:focus {
background: var(--color-widget-focus);
}
&::selection {
background: var(--color-widget-selection);
}
}
.NumericInputWidget.slider {
Expand Down

0 comments on commit 7718734

Please sign in to comment.