Файли
openidea/src/features/settings/keymap/Keymap.module.css
T
l0ng-ai 5d6c76cdda fix(keymap): make shortcut recording and conflicts easier to read (#5220)
The shortcut recorder puts the action name and its category in the dialog body and uses a full-width first field. The optional second stroke stays beside its checkbox. Conflicting actions use two-line rows that keep the action name, category and binding readable in a narrow window.
2026-11-23 09:11:47 +08:00

283 рядки
4.9 KiB
CSS

.page {
display: flex;
flex-direction: column;
gap: var(--space-2);
height: 100%;
min-height: 0;
min-width: 0;
}
.presetRow,
.toolbar {
display: flex;
flex: none;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--space-1) var(--space-2);
}
.presetGroup {
display: flex;
align-items: center;
flex: 0 1 328px;
min-width: 0;
gap: var(--space-2);
}
.presetLabel {
flex: none;
white-space: nowrap;
color: var(--fg);
}
.presetSelect {
flex: 1;
}
.modifiedNote {
color: var(--fg-subtle);
font-size: var(--fs-small);
overflow-wrap: anywhere;
}
.treeActions,
.filterGroup {
display: flex;
align-items: center;
gap: var(--space-1);
}
.treeActions {
flex: none;
}
.filterGroup {
flex: 1 1 300px;
min-width: 0;
max-width: 392px;
}
.search,
.shortcutFilter {
flex: 1;
min-width: 0;
}
.shortcutFilter {
display: flex;
align-items: center;
gap: var(--space-1);
height: var(--h-field);
padding: 0 var(--space-1) 0 var(--space-2);
background: var(--bg-field);
border-radius: var(--radius-control);
box-shadow: inset 0 0 0 1px var(--border-button);
}
.shortcutFilter:focus-within {
box-shadow: inset 0 0 0 1px var(--focus-ring);
}
.leading {
flex: none;
color: var(--fg-subtle);
}
.filterRecorder {
flex: 1;
box-shadow: none;
padding: 0;
}
.filterRecorder:focus,
.filterRecorder:focus-visible {
box-shadow: none;
outline: none;
}
.filterRecorder > span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.treeWrap {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
border-radius: var(--radius-small);
box-shadow: inset 0 0 0 1px var(--border);
padding-block: var(--space-0-5);
}
.empty {
padding: 8px 12px;
color: var(--fg-subtle);
}
.catRow,
.actionRow {
display: flex;
align-items: center;
gap: var(--space-1-5);
min-width: 0;
flex: 1;
}
.catIcon {
color: var(--fg-subtle);
}
.catName {
color: var(--fg-emphasis);
}
.actionIcon {
display: inline-flex;
flex: none;
width: 14px;
color: var(--fg-subtle);
}
.actionTitle {
flex: 1 0 auto;
}
.modified {
color: var(--accent);
}
.bindings {
display: inline-flex;
flex: none;
gap: var(--space-2);
padding-inline: var(--space-2);
}
/* recorder */
.mousePad {
display: flex;
align-items: center;
justify-content: center;
height: 72px;
padding: 0 12px;
border-radius: var(--radius-small);
box-shadow: inset 0 0 0 1px var(--border-strong);
color: var(--fg-emphasis);
text-align: center;
cursor: default;
user-select: none;
}
.recorder {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
height: var(--h-control);
padding: 0 8px;
border-radius: var(--radius-small);
box-shadow: inset 0 0 0 1px var(--border-strong);
color: var(--fg-emphasis);
cursor: text;
outline: none;
}
.recorder:focus {
box-shadow: inset 0 0 0 1px var(--accent);
}
.recorderDisabled {
opacity: 0.5;
cursor: default;
}
.recorded {
font-family: var(--font-keys);
letter-spacing: 0.04em;
}
.recorderPlaceholder {
color: var(--fg-faint);
}
/* record dialog */
.recordBody {
display: flex;
flex-direction: column;
gap: var(--space-2);
padding: 14px;
}
.recordRow {
display: grid;
grid-template-columns: 120px minmax(0, 1fr);
align-items: center;
gap: var(--space-2);
}
.recordLabel {
color: var(--fg);
}
.shortcutBody {
display: flex;
flex-direction: column;
gap: var(--space-2);
padding: var(--space-2) var(--space-3) 0;
font-size: var(--fs-ui);
overflow-wrap: anywhere;
}
.actionSummary {
display: grid;
gap: var(--space-0-5);
}
.actionName {
color: var(--fg-strong);
font-weight: 600;
}
.shortcutField {
flex: 0 0 auto;
background: var(--bg-field);
}
.shortcutField > span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.secondStroke {
display: flex;
align-items: center;
gap: var(--space-2);
}
.secondStroke > label {
max-width: 55%;
}
.secondStroke .shortcutField {
flex: 1;
}
.recordHint {
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.shortcutStatus {
display: grid;
gap: var(--space-1);
}
.conflictTitle {
display: flex;
align-items: center;
gap: var(--space-1-5);
color: var(--fg-emphasis);
font-weight: 600;
}
.conflictIcon {
flex: none;
color: var(--warning);
--icon-color: currentColor;
}
.conflictList {
list-style: none;
margin: 0;
padding: 0;
max-height: 132px;
overflow-y: auto;
}
.conflictList li {
display: grid;
grid-template-columns: minmax(0, 1fr) fit-content(42%);
align-items: start;
gap: var(--space-2);
padding-block: var(--space-1);
}
.conflictAction {
color: var(--fg);
overflow-wrap: anywhere;
}
.actionPath {
color: var(--fg-subtle);
font-size: var(--fs-small);
}
.conflictBinding {
text-align: end;
white-space: normal;
overflow-wrap: anywhere;
}
.nameError {
color: var(--danger);
font-size: var(--fs-small);
padding-left: 128px;
}