Skip to content

Commit

Permalink
No more context menu dot, every track has one; Fixes #226, Fixes #213
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedb committed Nov 17, 2017
1 parent 8836b01 commit 7ec5a85
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 68 deletions.
9 changes: 9 additions & 0 deletions src/js/components/Track.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ export default class Track extends React.Component{
)
}

track_columns.push(
<span
className="context-zone"
key="context-zone"
onClick={e => this.handleContextMenu(e)}>
<FontAwesome name="ellipsis-h" fixedWidth />
</span>
)

if (this.props.mini_zones){

// Select zone handles selection events only
Expand Down
1 change: 0 additions & 1 deletion src/js/components/TrackList.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ class TrackList extends React.Component{
}
)
}
{this.props.selected_tracks.length > 0 ? <ContextMenuTrigger onTrigger={e => this.handleContextMenu(e, false)} /> : null}
</div>
);
}
Expand Down
49 changes: 0 additions & 49 deletions src/scss/components/_context-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -318,53 +318,4 @@
opacity: 0.15;
}
}
}

#app > .notouch .list.track-list {
.context-menu-trigger {
display: none;
}
}

.list {
&.track-list {
.context-menu-trigger {
@include gradient_overlay(50%, 0.15);
display: block;
position: fixed;
bottom: 55px;
right: 5px;
width: 48px;
height: 8px;
padding: 20px 0;
overflow: hidden;
z-index: 97;
background: $blue;

.dot {
background: $white;
}

&:focus,
&:active {
background: darken($blue, 10%);
}
}

@include responsive($bp_medium){
.context-menu-trigger {
bottom: 8px;
right: 43px;
width: 32px;
height: 8px;
padding: 12px 0;
z-index: 102;

.dot {
width: 5px;
height: 5px;
}
}
}
}
}
51 changes: 33 additions & 18 deletions src/scss/components/_lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,19 @@
.source {
color: $mid_grey;
position: absolute;
top: 14px;
right: 12px;
top: 16px;
right: 32px;
}

.context-zone {
position: absolute;
top: 12px;
right: 4px;
padding: 4px;

.fa {
font-size: 16px;
}
}
}
}
Expand Down Expand Up @@ -213,26 +224,26 @@
.list-item {

&.can-sort {
padding-left: 78px !important;
padding-left: 70px !important;
}

&:not(.can-sort){
padding-left: 46px !important;
padding-left: 42px !important;
}

.select-zone {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 38px;
width: 34px;
font-size: 8px;
display: block;

.fa {
position: absolute;
top: 27px;
left: 19px;
left: 17px;
pointer-events: none;
color: $white;
z-index: 1;
Expand All @@ -247,24 +258,24 @@
height: 14px;
position: absolute;
top: 23px;
left: 16px;
left: 14px;
}
}

.drag-zone {
position: absolute;
top: 0;
left: 38px;
left: 34px;
height: 100%;
width: 38px;
width: 34px;
font-size: 14px;
display: block;
color: $mid_grey;

.fa {
position: absolute;
top: 24px;
left: 8px;
left: 6px;
pointer-events: none;
}
}
Expand All @@ -286,14 +297,14 @@
top: 0;
left: 0;
height: 100%;
width: 38px;
width: 34px;
font-size: 8px;
display: block;

.fa {
position: absolute;
top: 27px;
left: 19px;
left: 17px;
pointer-events: none;
color: $white;
z-index: 1;
Expand All @@ -308,28 +319,32 @@
height: 14px;
position: absolute;
top: 16px;
left: 16px;
left: 14px;
}
}

.drag-zone {
position: absolute;
top: 0;
left: 38px;
left: 34px;
height: 100%;
width: 38px;
width: 34px;
font-size: 14px;
display: block;
color: $mid_grey;

.fa {
position: absolute;
top: 24px;
left: 8px;
left: 6px;
pointer-events: none;
}
}

.context-zone {
top: 14px;
}

.col {
&.name {
width: auto !important;
Expand Down Expand Up @@ -404,10 +419,10 @@

&.track-list {
.list-item.can-sort {
padding-left: 78px !important;
padding-left: 70px !important;
}
.list-item:not(.can-sort){
padding-left: 46px !important;
padding-left: 42px !important;
}
}
}
Expand Down

0 comments on commit 7ec5a85

Please sign in to comment.