Skip to content

Commit

Permalink
Merge pull request #511 from nextcloud/bugfix/501/colorpicker-invert
Browse files Browse the repository at this point in the history
Invert color picker icon on bright backgrounds
  • Loading branch information
juliusknorr authored Jun 28, 2018
2 parents 9d98107 + fdb1dbf commit 34d05f2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
7 changes: 5 additions & 2 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,8 @@ input.input-inline {
}
}

.colorselect-label {
background-image: url('../img/color_picker.svg');
.colorselect-label, .colorselect-label-white {
background-image: url('../img/color_picker-dark.svg');
background-position: center center;
background-repeat: no-repeat;
opacity: 1;
Expand All @@ -985,6 +985,9 @@ input.input-inline {
width: 40px;
}
}
.colorselect-label-white {
background-image: url('../img/color_picker.svg');
}
}

.labels {
Expand Down
6 changes: 1 addition & 5 deletions img/color_picker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions templates/part.board.sidebarView.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</div>
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in defaultColors" ng-style="{'background-color':'#{{ c }}'}" ng-click="label=setColor(label,c);" ng-class="{'selected': (c == label.color) }"><br /></div>
<label class="colorselect-label color" ng-style="getCustomBackground(label.hashedColor)" ng-init="label.hashedColor='#' + label.color">
<label class="colorselect-label{{ label.color | iconWhiteFilter }} color" ng-style="getCustomBackground(label.hashedColor)" ng-init="label.hashedColor='#' + label.color">
<input class="color" type="color" ng-model="label.hashedColor" value="#{{label.color}}" ng-change="label=setHashedColor(label)"/>
</label>
</div>
Expand All @@ -104,7 +104,7 @@
</div>
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in defaultColors" ng-style="{'background-color':'#{{ c }}'}" ng-click="newLabel=setColor(newLabel,c)" ng-class="{'selected': (c == newLabel.color), 'dark': (newBoard.color | textColorFilter) === '#ffffff' }"><br /></div>
<label class="colorselect-label color" ng-style="getCustomBackground(newLabel.hashedColor)" ng-init="newLabel.hashedColor='#' + newLabel.color">
<label class="colorselect-label{{ newLabel.color | iconWhiteFilter }} color" ng-style="getCustomBackground(newLabel.hashedColor)" ng-init="newLabel.hashedColor='#' + newLabel.color">
<input class="color" type="color" ng-model="newLabel.hashedColor" value="#{{newLabel.color}}" ng-change="newLabel=setHashedColor(newLabel)"/>
</label>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/part.boardlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<input class="edit ng-valid ng-empty" type="text" autofocus-on-insert ng-model="b.title" maxlength="100" ng-model-options="{ debounce: 250 }">
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in ::colors" ng-style="{'background-color':'#{{ c }}'}" ng-click="b=setColor(b,c)" ng-class="{'selected': (c == b.color) }"></div>
<label class="colorselect-label color" ng-style="getCustomBackground(b.hashedColor)" ng-init="b.hashedColor='#' + b.color">
<label class="colorselect-label{{ b.color | iconWhiteFilter }} color" ng-style="getCustomBackground(b.hashedColor)" ng-init="b.hashedColor='#' + b.color">
<input class="color" type="color" ng-model="b.hashedColor" value="#{{b.color}}" ng-change="b=setHashedColor(b)"/>
</label>
</div>
Expand Down Expand Up @@ -107,7 +107,7 @@ class="ng-pristine ng-valid" ng-submit="boardCreate()">
autofocus-on-insert ng-model="newBoard.title" maxlength="100" ng-model-options="{ debounce: 250 }">
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in ::colors" ng-style="{'background-color':'#{{ c }}'}" ng-click="selectColor(c);b=setColor(b,c);"ng-class="{'selected': (c == newBoard.color), 'dark': (newBoard.color | textColorFilter) === '#ffffff' }"></div>
<label class="colorselect-label color" ng-style="getCustomBackground(newBoard.hashedColor)" ng-init="newBoard.hashedColor='#' + newBoard.color">
<label class="colorselect-label{{ newBoard.color | iconWhiteFilter }} color" ng-style="getCustomBackground(newBoard.hashedColor)" ng-init="newBoard.hashedColor='#' + newBoard.color">
<input class="color" type="color" ng-model="newBoard.hashedColor" value="#{{newBoard.color}}" ng-change="newBoard=setHashedColor(newBoard)"/>
</label>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/part.navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</form>
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in ::colors" ng-style="{'background-color':'#{{ c }}'}" ng-click="b=setColor(b,c)" ng-class="{'selected': (c == b.color) }"></div>
<label class="colorselect-label color" ng-style="getCustomBackground(b.hashedColor)" ng-init="b.hashedColor='#' + b.color">
<label class="colorselect-label{{ b.color | iconWhiteFilter }} color" ng-style="getCustomBackground(b.hashedColor)" ng-init="b.hashedColor='#' + b.color">
<input class="color" type="color" ng-model="b.hashedColor" value="#{{b.color}}" ng-change="b=setHashedColor(b)"/>
</label>
</div>
Expand All @@ -58,7 +58,7 @@
</form>
<div class="colorselect" ng-controller="ColorPickerController">
<div class="color" ng-repeat="c in ::colors" ng-style="{'background-color':'#{{ c }}'}" ng-click="selectColor(c);newBoard=setColor(newBoard,c)" ng-class="{'selected': (c == newBoard.color), 'dark': (newBoard.color | textColorFilter) === '#ffffff' }"><br /></div>
<label class="colorselect-label color" ng-style="getCustomBackground(newBoard.hashedColor)" ng-init="newBoard.hashedColor='#' + newBoard.color">
<label class="colorselect-label{{ newBoard.color | iconWhiteFilter }} color" ng-style="getCustomBackground(newBoard.hashedColor)" ng-init="newBoard.hashedColor='#' + newBoard.color">
<input class="color" type="color" ng-model="newBoard.hashedColor" value="#{{newBoard.color}}" ng-change="newBoard=setHashedColor(newBoard)"/>
</label>
</div>
Expand Down

0 comments on commit 34d05f2

Please sign in to comment.