Checkbox icon for wireframe toggle

This commit is contained in:
JannisX11 2021-01-22 21:31:57 +01:00
parent 64686720b9
commit 9b55ed47e7
3 changed files with 4 additions and 7 deletions

View File

@ -324,12 +324,7 @@ EditSession.Client = class {
const Chat = {
history: [],
expanded: true,
maxlength: 512,
toggle() {
this.expanded = !this.expanded;
BarItems.toggle_chat.setIcon( Chat.expanded ? 'keyboard_arrow_down' : 'keyboard_arrow_up' )
},
send(text) {
if (typeof text !== 'string') {
text = $('input#chat_input').val()
@ -444,7 +439,7 @@ Interface.definePanels(function() {
template: `
<div>
<div class="bar next_to_title" id="chat_title_bar"></div>
<ul id="chat_history" v-if="expanded">
<ul id="chat_history">
<li v-for="msg in history">
<b v-if="msg.showAuthor()" v-bind:class="{self: msg.self}">{{ msg.author }}:</b>
<span class="text" v-bind:style="{color: msg.hex || 'inherit'}" v-html="msg.html"></span>

View File

@ -646,6 +646,7 @@ const MenuBar = {
'toggle_wireframe',
'preview_checkerboard',
'painting_grid',
'_',
'toggle_quad_view',
'focus_on_selection',
{name: 'menu.view.screenshot', id: 'screenshot', icon: 'camera_alt', children: [

View File

@ -1863,7 +1863,7 @@ function buildGrid() {
BARS.defineActions(function() {
new Action('toggle_wireframe', {
icon: 'border_clear',
icon: 'check_box_outline_blank',
category: 'view',
keybind: new Keybind({key: 90}),
condition: () => Toolbox && Toolbox.selected && Toolbox.selected.allowWireframe,
@ -1874,6 +1874,7 @@ BARS.defineActions(function() {
Animator.preview()
}
Blockbench.showQuickMessage('message.wireframe.' + (Prop.wireframe ? 'enabled' : 'disabled'))
this.setIcon(Prop.wireframe ? 'check_box' : 'check_box_outline_blank')
}
})
new Action('preview_checkerboard', {