Skip to content

Commit

Permalink
Merge pull request #11755 from ronso0/track-label-editor
Browse files Browse the repository at this point in the history
WTrackProperty: show simple editor on delayed double-click
  • Loading branch information
daschuer authored Apr 3, 2024
2 parents 9f68007 + 687ed2f commit 210c739
Show file tree
Hide file tree
Showing 11 changed files with 330 additions and 44 deletions.
26 changes: 22 additions & 4 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,17 @@ WLibraryTextBrowser {
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
WBeatSpinBox,
/* Track label inline editor */
WTrackPropertyEditor,
#LibraryBPMSpinBox {
color: #ddd;
background-color: #0f0f0f;
selection-color: #000;
selection-background-color: #ccc;
}
WLibrary QLineEdit,
WTrackPropertyEditor,
#LibraryBPMSpinBox {
border: 1px solid #006596;
}

Expand Down Expand Up @@ -843,6 +849,7 @@ WPushButton,
WKey,
WTime,
WTrackProperty,
WTrackPropertyEditor,
WRecordingDuration,
QSpinBox,
WBeatSpinBox,
Expand Down Expand Up @@ -1098,15 +1105,21 @@ WBeatSpinBox,
}

/* Start editable widgets in decks */
/* emphasize editable widgets on hover */
#BpmKeyEditRowCollapsed:hover,
#BpmKeyEditRowExpanded:hover,
#PositionGutter:hover,
#PlayPositionTextSmall:hover,
#StarratingGutter:hover {
/* emphasize editable widgets on hover */
border: 1px solid #FF6600;
#StarratingGutter:hover,
WTrackProperty:hover {
background-color: rgba(255, 102, 0, 128);
}
}
#BpmKeyEditRowCollapsed:hover,
#BpmKeyEditRowExpanded:hover,
WTrackProperty[selected="true"] {
border: 1px solid #FF6600;
}

#BpmKeyEditRowCollapsed {
qproperty-layoutAlignment: 'AlignCenter';
/* emphasize active widget */
Expand Down Expand Up @@ -1593,6 +1606,11 @@ WStarRating {
font-size: 15px;
}

/* Track label inline editor in decks and samplers */
WTrackPropertyEditor {
font-size: 15px;
}

#SampleDecksContainer {
}

Expand Down
9 changes: 9 additions & 0 deletions res/skins/LateNight/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ WLibraryTextBrowser QMenu,
WTrackMenu,
WTrackMenu QMenu,
WTrackMenu QMenu QCheckBox,
WTrackPropertyEditor,
QLineEdit QMenu,
WCoverArtMenu,
QLabel#labelRecPrefix,
Expand Down Expand Up @@ -244,6 +245,7 @@ WBeatSpinBox,
#BpmTextSmall,
#FxUnitLabel,
#SamplerTitle,
WTrackPropertyEditor,
WTime,
WRecordingDuration {
font-size: 16px;
Expand Down Expand Up @@ -451,6 +453,13 @@ WSpinny { /*
#RateSliderBoxCompactSync {
margin-left: 5px;
}

WTrackProperty,
WTrackProperty[selected="false"] {
background-color: transparent;
border: 0px solid transparent;
border-radius: 1px;
}
/************** Decks ********************************************************/


Expand Down
8 changes: 7 additions & 1 deletion res/skins/LateNight/style_classic.qss
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ WLibrary,
}


WTrackProperty:hover,
WTrackProperty:hover[selected="false"],
WTrackProperty:hover[selected="true"],
#BpmTapContainer:hover {
background-color: #151517;
border-radius: 1px;
Expand Down Expand Up @@ -2138,7 +2141,10 @@ WLibrarySidebar {
/* Table cell in edit mode */
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
#LibraryBPMSpinBox {
#LibraryBPMSpinBox,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor,
WTrackProperty[selected="true"] {
color: #ddd;
background-color: #0f0f0f;
selection-color: #000;
Expand Down
29 changes: 21 additions & 8 deletions res/skins/LateNight/style_palemoon.qss
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,23 @@ WSearchLineEdit {
border-color: #0c0c0c;
}

WTrackProperty:hover,
WTrackProperty:hover[selected="false"],
WTrackProperty:hover[selected="true"],
WTrackProperty[selected="true"],
#BpmTapContainer:hover,
#PlayPositionText:hover, #PlayPositionTextSmall:hover {
background-color: #151517;
border-radius: 1px;
}
}
WTrackProperty:hover[selected="true"],
WTrackProperty[selected="true"] {
background-color: #181819;
}
#BpmTap[pressed="true"],
WTrackProperty[selected="true"] {
border: 1px solid #7d350d;
/* border: 1px solid #888;*/
}

/* Disabled for now since the hover effect is stuck as soon as the
track menu is opened.
Expand Down Expand Up @@ -1676,9 +1688,6 @@ WPushButton#LoopOut[pressed="true"],
#CueDeleteButton[pressed="true"]*/ {
background-color: #7d350d;
}
#BpmTap[pressed="true"] {
border: 1px solid #7d350d;
}

/* Red */
#EQKillButtonBox WPushButton[displayValue="1"],
Expand Down Expand Up @@ -2532,6 +2541,7 @@ WLibraryTextBrowser,
WLibrarySidebar,
#SkinSettings,
WSearchLineEdit,
WTrackPropertyEditor,
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
#spinBoxTransition,
Expand Down Expand Up @@ -2600,12 +2610,15 @@ WTrackTableView {
/* Table cell in edit mode */
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
#LibraryBPMSpinBox {
#LibraryBPMSpinBox,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor {
color: #ddd;
selection-color: #000;
selection-background-color: #ccc;
border: 1px solid #2c454f;
}
border: 1px solid #257b82;
border-radius: 0px;
}

/* Entire BPM cell */
/* Lock icon at the left */
Expand Down
5 changes: 3 additions & 2 deletions res/skins/Shade/deck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<BackPath>style/style_bg_deck_top_mid.png</BackPath>
<Children>
<WidgetGroup>
<ObjectName>ArtistAndTimeRow</ObjectName>
<ObjectName>TitleEjectRow</ObjectName>
<Size>0e,23f</Size>
<Layout>horizontal</Layout>
<Children>
Expand Down Expand Up @@ -122,7 +122,8 @@
</Style>
<Property>artist</Property>
<Channel><Variable name="channum"/></Channel>
<SizePolicy>me,max</SizePolicy>
<!-- <Size>0e,19f</Size> -->
<SizePolicy>me,me</SizePolicy>
<Elide>right</Elide>
</TrackProperty>
<NumberPos>
Expand Down
14 changes: 14 additions & 0 deletions res/skins/Shade/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,26 @@ WTrackTableView {
/* Table cell in edit mode */
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor,
#LibraryBPMSpinBox {
color: #ddd;
background-color: #0f0f0f;
selection-color: #000;
selection-background-color: #ccc;
}
WLibrary QLineEdit,
#LibraryBPMSpinBox {
border: 1px solid #656d75;
}
WTrackPropertyEditor {
font-size: 13px;
border-width: 1px;
border-style: solid;
}
#TitleEjectRow WTrackPropertyEditor {
margin-top: 4px;
}

/* BPM lock icon in the library "BPM" column. */
#LibraryBPMButton::indicator:checked {
Expand Down Expand Up @@ -660,6 +673,7 @@ WLibrarySidebar {
Defined by SearchBox */
margin: 0px;
}
WTrackPropertyEditor,
WTrackTableView:focus,
WLibrarySidebar:focus,
#LibraryContainer WLibraryTextBrowser:focus {
Expand Down
2 changes: 2 additions & 0 deletions res/skins/Shade/style_dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ WTrackTableView {
/* Table cell in edit mode */
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor,
#LibraryBPMSpinBox {
color: #ddd;
background-color: #0f0f0f;
Expand Down
21 changes: 19 additions & 2 deletions res/skins/Tango/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ WEffectChainPresetSelector QAbstractScrollArea,
WEffectChainPresetButton QMenu,
WEffectChainPresetButton QMenu QCheckBox,
WSearchLineEdit QAbstractScrollArea,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor,
#fadeModeCombobox,
#fadeModeCombobox QAbstractScrollArea,
/* With 'Ubuntu' font the header section titles would always be top-aligned... */
Expand Down Expand Up @@ -790,9 +792,16 @@ WLabel#TrackComment {
#PlayPositionMini {
padding: 0px 1px 0px 0px;
}
#PlayPosition:hover, #PlayPositionMini:hover {
#PlayPosition:hover,
#PlayPositionMini:hover,
WTrackProperty:hover,
WTrackProperty:hover[selected="false"],
WTrackProperty[selected="true"] {
border: 1px solid #ccc;
}
WTrackProperty:hover[selected="true"] {
border: 1px solid #fff;
}
#TrackTitleMini {
padding: 0px 0px 0px 1px;
}
Expand Down Expand Up @@ -2627,12 +2636,19 @@ WTrackTableView {
/* Table cell in edit mode */
WLibrary QLineEdit,
WLibrary QPlainTextEdit,
/* Track label inline editor in decks and samplers */
WTrackPropertyEditor,
#LibraryBPMSpinBox {
color: #ddd;
background-color: #0f0f0f;
selection-color: #000;
selection-background-color: #ccc;
border: 1px solid #555;
border-width: 1px;
border-style: solid;
}
WLibrary QLineEdit,
#LibraryBPMSpinBox {
border-color: #555;
}

WLibrarySidebar {
Expand All @@ -2646,6 +2662,7 @@ WLibrarySidebar {
Shift WSearchLineEdit instead */
margin: 0px;
}
WTrackPropertyEditor,
WTrackTableView:focus,
WLibrarySidebar:focus,
WTrackTableView:focus,
Expand Down
13 changes: 9 additions & 4 deletions src/skin/legacy/tooltips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void Tooltips::addStandardTooltips() {
QString leftClick = tr("Left-click");
QString rightClick = tr("Right-click");
QString doubleClick = tr("Double-click");
QString selectedClick = tr("Select and click: Show inline value editor");
QString scrollWheel = tr("Scroll-wheel");
QString shift = tr("Shift-key");
QString loopActive = "(" + tr("loop active") + ")";
Expand Down Expand Up @@ -814,7 +815,8 @@ void Tooltips::addStandardTooltips() {
<< dropTracksHere
<< dragItem
<< QString("%1: %2").arg(doubleClick, trackProperties)
<< QString("%1: %2").arg(rightClick, trackMenu);
<< QString("%1: %2").arg(rightClick, trackMenu)
<< selectedClick;

add("track_title")
<< tr("Track Title")
Expand All @@ -823,7 +825,8 @@ void Tooltips::addStandardTooltips() {
<< dropTracksHere
<< dragItem
<< QString("%1: %2").arg(doubleClick, trackProperties)
<< QString("%1: %2").arg(rightClick, trackMenu);
<< QString("%1: %2").arg(rightClick, trackMenu)
<< selectedClick;

add("track_album")
<< tr("Track Album")
Expand All @@ -832,7 +835,8 @@ void Tooltips::addStandardTooltips() {
<< dropTracksHere
<< dragItem
<< QString("%1: %2").arg(doubleClick, trackProperties)
<< QString("%1: %2").arg(rightClick, trackMenu);
<< QString("%1: %2").arg(rightClick, trackMenu)
<< selectedClick;

add("track_key")
//: The musical key of a track
Expand All @@ -856,7 +860,8 @@ void Tooltips::addStandardTooltips() {
<< dropTracksHere
<< dragItem
<< QString("%1: %2").arg(doubleClick, trackProperties)
<< QString("%1: %2").arg(rightClick, trackMenu);
<< QString("%1: %2").arg(rightClick, trackMenu)
<< selectedClick;

add("time")
<< tr("Clock")
Expand Down
Loading

0 comments on commit 210c739

Please sign in to comment.