style improvement on Label, FileView, GridView, system menu and app Panel

This commit is contained in:
DanyLE 2022-07-05 13:22:51 +02:00
parent b2ce9ec978
commit e63cae1550
9 changed files with 40 additions and 14 deletions

Binary file not shown.

View File

@ -468,7 +468,8 @@ namespace OS {
v.text = v.text.substring(0, 9) + "..."; v.text = v.text.substring(0, 9) + "...";
}*/ }*/
v.iconclass = v.iconclass ? v.iconclass : v.type; v.iconclass = v.iconclass ? v.iconclass : v.type;
v.icon = v.icon; if(v.icon)
v.iconclass = undefined;
items.push(v); items.push(v);
}); });
(this.refs.listview as ListViewTag).data = items; (this.refs.listview as ListViewTag).data = items;
@ -489,7 +490,10 @@ namespace OS {
} }
if(!v.text) if(!v.text)
v.text = v.filename; v.text = v.filename;
v.iconclass = v.iconclass ? v.iconclass : v.type; v.iconclass = v.iconclass ? v.iconclass : v.type;
if(v.icon)
v.iconclass = undefined;
const row = [ const row = [
v, v,
{ {
@ -550,7 +554,8 @@ namespace OS {
v.open = false; v.open = false;
} }
v.iconclass = v.iconclass ? v.iconclass : v.type; v.iconclass = v.iconclass ? v.iconclass : v.type;
v.icon = v.icon; if(v.icon)
v.iconclass = undefined;
return nodes.push(v); return nodes.push(v);
}); });
return nodes; return nodes;

View File

@ -346,6 +346,9 @@ namespace OS {
* @memberof SimpleGridCellTag * @memberof SimpleGridCellTag
*/ */
protected ondatachange(): void { protected ondatachange(): void {
const label = (this.refs.cell as LabelTag);
label.icon = undefined;
label.iconclass = undefined;
(this.refs.cell as LabelTag).set(this.data); (this.refs.cell as LabelTag).set(this.data);
} }

View File

@ -386,14 +386,14 @@ namespace OS {
* @memberof SimpleMenuEntryTag * @memberof SimpleMenuEntryTag
*/ */
set icon(v: string) { set icon(v: string) {
$(this.refs.container).removeClass("fix_padding"); //$(this.refs.container).removeClass("fix_padding");
if (!v) { if (!v) {
return; return;
} }
//$(this).attr("icon", v); //$(this).attr("icon", v);
const label = this.refs.label as LabelTag; const label = this.refs.label as LabelTag;
label.icon = v; label.icon = v;
$(this.refs.container).addClass("fix_padding"); //$(this.refs.container).addClass("fix_padding");
} }
/** /**

View File

@ -1,8 +1,7 @@
afx-menu afx-switch span{ afx-menu afx-switch span{
width: 20px; padding-top: 3px;
height: 16px;
font-size: 16px; font-size: 16px;
/*margin-top:5px;*/ height: 19px;
} }
afx-menu span.shortcut{ afx-menu span.shortcut{
text-align: right; text-align: right;
@ -21,7 +20,6 @@ afx-menu afx-menu ul {
background-color: #363636; background-color: #363636;
} }
afx-menu ul li /*, afx-menu ul >afx-menu-entry > li*/{ afx-menu ul li /*, afx-menu ul >afx-menu-entry > li*/{
padding:3px;
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
@ -56,3 +54,7 @@ afx-menu afx-menu .afx_submenu:before, afx-menu ul.context .afx_submenu:before
afx-menu ul.context li{ afx-menu ul.context li{
min-width: 150px; min-width: 150px;
} }
afx-menu afx-label span {
height: 22px !important;
}

View File

@ -1,8 +1,7 @@
afx-menu afx-switch span{ afx-menu afx-switch span{
width: 20px; padding-top: 3px;
height: 16px;
font-size: 16px; font-size: 16px;
/*margin-top:5px;*/ height: 19px;
} }
afx-menu span.shortcut{ afx-menu span.shortcut{
text-align: right; text-align: right;
@ -21,7 +20,6 @@ afx-menu afx-menu ul {
background-color: #e7e7e7; background-color: #e7e7e7;
} }
afx-menu ul li /*, afx-menu ul >afx-menu-entry > li*/{ afx-menu ul li /*, afx-menu ul >afx-menu-entry > li*/{
padding:3px;
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
@ -56,3 +54,7 @@ afx-menu afx-menu .afx_submenu:before, afx-menu ul.context .afx_submenu:before
afx-menu ul.context li{ afx-menu ul.context li{
min-width: 150px; min-width: 150px;
} }
afx-menu afx-label span {
height: 22px !important;
}

View File

@ -1,8 +1,15 @@
afx-label i.icon-style { afx-label i.icon-style {
float: left; display: inline-block;
flex-shrink: 0;
}
afx-label span {
display: flex;
flex-direction: row;
align-items:center;
} }
afx-label i.label-text{ afx-label i.label-text{
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
margin-left: 3px; margin-left: 3px;
flex: 1;
} }

View File

@ -34,6 +34,7 @@ afx-menu ul li {
float: left; float: left;
cursor:default; cursor:default;
} }
/*
afx-menu ul li.fix_padding{ afx-menu ul li.fix_padding{
padding-top:1px; padding-top:1px;
padding-bottom: 0; padding-bottom: 0;
@ -45,7 +46,7 @@ afx-menu afx-menu ul li.fix_padding{
padding:3px; padding:3px;
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} } */
afx-menu afx-menu { afx-menu afx-menu {
top:100%; top:100%;
left:0; left:0;

View File

@ -97,3 +97,9 @@ afx-sys-panel afx-hbox[data-id="btlist"] afx-button button
border-radius: 0; border-radius: 0;
border: 0px; border: 0px;
} }
afx-sys-panel afx-list-view[data-id="applist"] afx-label span,
afx-sys-panel afx-list-view[data-id="catlist"] afx-label span
{
white-space: nowrap;
}