Skip to content

Commit

Permalink
Fixed colors not being applied on the tabs icons
Browse files Browse the repository at this point in the history
  • Loading branch information
LazeMSS committed Dec 10, 2020
1 parent 66e8f5c commit f5b29c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions octoprint_uicustomizer/static/js/uicustomizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,8 @@ $(function() {
return true;
}
if (enabled){
OctoPrint.coreui.viewmodels.settingsViewModel.settings.plugins.navbartemp.useShortNames(true);
OctoPrint.coreui.viewmodels.settingsViewModel.settings.plugins.navbartemp.makeMoreRoom(true);
$('#navbar_plugin_navbartemp').addClass('UICIconHack');
$('#navbar_plugin_navbartemp.UICIconHack >div > span').wrap('<div></div>');
}else{
Expand Down Expand Up @@ -1381,18 +1383,18 @@ $(function() {
}
}
// Set color
var colorclass = {};
if (data[5] != undefined){
$(newtabcontent).css({'color':data[5]});
colorclass ={'color':data[5]};
}
// On the right or the left hand side icon only
if (data[4] === true && data[3] != ''){
$(newtabcontent).prepend('<i class="UICPadRight hidden-tablet '+data[3]+'"></i>');
$(newtabcontent).prepend($('<i class="UICPadRight hidden-tablet '+data[3]+'"></i>').css(colorclass));
}else if (data[4] === false && data[3] != ''){
$(newtabcontent).append('<i class="UICPadLeft hidden-tablet '+data[3]+'"></i>');
$(newtabcontent).append($('<i class="UICPadLeft hidden-tablet '+data[3]+'"></i>').css(colorclass));
}else if (data[4] == "iconOnly" && data[3] != ''){
$(newtabcontent).append('<i class="'+data[3]+'"></i>');
$(newtabcontent).append($('<i class="'+data[3]+'"></i>').css(colorclass));
}

$(target).html(newtabcontent.html()).attr('title',title);
}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "UI Customizer"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.1.0"
plugin_version = "0.1.1.1"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit f5b29c4

Please sign in to comment.