Skip to content

Commit

Permalink
[Frontend] Refactoring glyphs to classes
Browse files Browse the repository at this point in the history
fixes #1047
Very much In-progess: convert some controls;
  • Loading branch information
charlesh88 committed Jun 23, 2016
1 parent e93a90a commit 18d9f3d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 39 deletions.
5 changes: 1 addition & 4 deletions platform/commonUI/browse/res/templates/back-arrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
at runtime from the About dialog for additional information.
-->

<!-- Back Arrow Icon used on mobile-->
<a
class='type-icon icon ui-symbol s-back'
<a class='type-icon icon ui-symbol s-back'
ng-show="context.getPath().length > 2"
ng-click="context.getParent().getCapability('action').perform('navigate')">
{
</a>

2 changes: 1 addition & 1 deletion platform/commonUI/browse/res/templates/menu-arrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
-->

<span ng-controller="MenuArrowController as menuArrow">
<a class='ui-symbol context-available'
<a class='context-available'
ng-click='menuArrow.showMenu($event)'></a>
</span>
4 changes: 2 additions & 2 deletions platform/commonUI/edit/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ define([
"description": "Edit",
"category": "view-control",
"glyph": "p",
"cssclass": "icon-pencil"
"cssclass": "major icon-pencil"
},
{
"key": "properties",
Expand All @@ -183,7 +183,7 @@ define([
],
"implementation": PropertiesAction,
"glyph": "p",
"cssclass": "icon-pencil",
"cssclass": "major icon-pencil",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
"depends": [
Expand Down
9 changes: 5 additions & 4 deletions platform/commonUI/general/res/sass/_glyphs.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
@mixin glyph($unicode) {
&:before {
content: $unicode;
font-family: 'symbolsfont';
}
}

[class*="icon-"]:before {
font-family: 'symbolsfont';
}
//[class*="icon-"]:before {
// font-family: 'symbolsfont';
//}

.ui-symbol,
.icon {
// TO-DO: refactor markup to use "icon-" approach
&.mobile-info { @include glyph('\e920'); }
&.context-available { @include glyph('\e902'); }
//&.context-available { @include glyph('\e902'); }
}

.icon-alert-rect { @include glyph('\e900'); }
Expand Down
32 changes: 12 additions & 20 deletions platform/commonUI/general/res/sass/controls/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,27 @@ $pad: $interiorMargin * $baseRatio;
padding: 0 ($pad / $baseRatio) / 2;
}

&.major,
&.key-edit,
&.key-properties {
&.major {
$bg: $colorBtnMajorBg;
$hc: pullForward($bg, 10%);
@include btnSubtle($bg, $hc, $colorBtnMajorFg, $colorBtnMajorFg);
}

&.t-save:before {
content:'\e612';
font-family: symbolsfont;
margin-right: $interiorMarginSm;
&.t-save {
@extend .icon-save;
}
&.t-save-as:before {
content:'\e612';
font-family: symbolsfont;
margin-right: $interiorMarginSm;
}
&.t-cancel {
@extend .icon-x;
.title-label { display: none; }
&:before {
content:'\78';
font-family: symbolsfont;
}
}

&.pause-play {
// TO-DO: glyph refactoring
.icon:before {
content: "\0000F1";
}
Expand All @@ -98,11 +92,7 @@ $pad: $interiorMargin * $baseRatio;
}

&.t-export {
&:before {
@extend .ui-symbol;
@extend .icon;
content: '\e623';
}
@extend .icon-download;
}

.icon {
Expand All @@ -115,6 +105,7 @@ $pad: $interiorMargin * $baseRatio;
}

.s-icon-btn {
// TO-DO: glyph refactoring
$c: $colorKey;
@extend .s-btn;
&:before {
Expand Down Expand Up @@ -189,7 +180,8 @@ body.desktop .mini-tab {
// |<
text-align: right;
&:before {
content:'\e903'; // Collapse left icon e613
//content:'\e903'; // Collapse left icon e613
content: '\e903';
right: $iconInnerLR;
}
&.collapsed {
Expand Down Expand Up @@ -246,9 +238,9 @@ body.desktop .mini-tab-icon {
display: inherit;
}

&:before {
content: '\78'; // X icon
}
//&:before {
// content: '\78'; // X icon
//}

&:hover {
color: $colorKey;
Expand Down
6 changes: 6 additions & 0 deletions platform/commonUI/general/res/sass/controls/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ input[type="search"] {
}
}

.s-back {
// Nav to parent arrow
@extend .icon-pointer-left;
}

/******************************************************** PROGRESS BAR */
@include keyframes(progress) {
100% { background-position: $progressBarStripeW center; }
Expand Down Expand Up @@ -540,6 +545,7 @@ textarea {

/******************************************************** MISC */
.context-available {
@extend .icon-arrow-down;
$c: $colorKey;
color: $c;
&:hover {
Expand Down
13 changes: 5 additions & 8 deletions platform/commonUI/general/res/sass/controls/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@
}

&.create-btn {
&:before {
content:'\2b';
display: inline;
font-family: symbolsfont;
}
@extend .icon-plus;
.title-label {
font-size: 1rem;
}
Expand All @@ -56,9 +52,9 @@
.menu {
left: 0;
text-align: left;
.ui-symbol.icon {
width: 12px;
}
//.ui-symbol.icon {
// width: 12px;
//}
}
}

Expand All @@ -77,6 +73,7 @@
}

.menu {
// TO-DO: reduce size of icons
@extend .s-menu;
display: block;
position: absolute;
Expand Down

0 comments on commit 18d9f3d

Please sign in to comment.