This commit is contained in:
crusader 2018-09-18 22:11:01 +09:00
parent c66a2834b8
commit 694a02c6cd
5 changed files with 857 additions and 448 deletions

View File

@ -1,5 +1,5 @@
<div id="app-menu-bar" role="menubar" aria-label="Application menu"> <div id="app-menu-bar" role="menubar" aria-label="Application menu">
<div class="toolbar-dropdown closed" role="menuitem" aria-expanded="false"> <!-- <div class="toolbar-dropdown closed" role="menuitem" aria-expanded="false">
<div class="toolbar-button"> <div class="toolbar-button">
<button class="button-component" type="button" tabindex="-1"> <button class="button-component" type="button" tabindex="-1">
<div class="menu-item"> <div class="menu-item">
@ -54,5 +54,7 @@
</div> </div>
</button> </button>
</div> </div>
</div> </div> -->
<p-menubar [model]="items" [autoDisplay]="false">
</p-menubar>
</div> </div>

View File

@ -0,0 +1,303 @@
// /deep/ .ui-menubar {
// height: var(--darwin-title-bar-height);
// color: var(--app-menu-button-color);
// background: transparent;
// padding: 0px;
// border: 0em;
// }
// /deep/ .ui-menu .ui-menuitem {
// padding-top: 2px;
// float: right;
// }
// // /deep/ .ui-menubar > .ui-menuitem {
// // width: 100%;
// // height: 100%;
// // }
// /deep/ p-menubarsub {
// margin: 0px;
// width: 100%;
// li.ui-menuitem{
// height: 22px !important;
// }
// }
// /deep/ .ui-menubar .ui-menubar-root-list>.ui-menuitem>.ui-menuitem-link {
// width: 100%;
// height: 100%;
// padding: 0em;
// color: var(--app-menu-button-color);
// }
// /deep/ .ui-menuitem .ui-menuitem-link {
// color: #222222;
// }
// /deep/ .ui-menuitem {
// min-width: 0;
// min-height: 0;
// position: relative;
// }
// /deep/ .ui-menubar .ui-menubar-root-list>.ui-menuitem {
// position: relative;
// display: inline-block;
// flex-direction: row;
// align-items: center;
// // padding-right: 10px;
// // padding: var(--spacing);
// // margin: 0em;
// // overflow: hidden;
// background-color: var(--toolbar-button-background-color);
// color: var(--toolbar-button-color);
// }
// /deep/ .ui-widget {
// font: 14px Arial;
// }
// // .ui-corner-all {
// // border-radius: 3px;
// // }
// // .ui-widget, .ui-widget * {
// // box-sizing: border-box;
// // }
// // #app-menu-bar .toolbar-dropdown:not(.open) > .toolbar-button > button {
// // color: var(--app-menu-button-color);
// // background: transparent;
// // }
// // #app-menu-bar .toolbar-button > button {
// // padding: 0 var(--spacing);
// // border: 0;
// // }
// // .toolbar-button > button {
// // position: relative;
// // display: flex;
// // flex-direction: row;
// // align-items: center;
// // padding: var(--spacing);
// // margin: 0;
// // overflow: hidden;
// // background-color: var(--toolbar-button-background-color);
// // color: var(--toolbar-button-color);
// // border-right: 1px solid var(--toolbar-button-border-color);
// // }
// // .toolbar-button > button {
// // -webkit-appearance: none;
// // border: none;
// // box-shadow: none;
// // background: transparent;
// // border-radius: 0;
// // text-align: left;
// // margin: 0;
// // padding: 0;
// // height: 100%;
// // width: 100%;
// // }
/deep/ body {
font-family: var(--font-family-sans-serif);
font-size: var(--font-size);
line-height: 1.5;
color: var(--text-color);
background-color: var(--background-color);
}
/deep/ body .ui-corner-all {
border-radius: 0px;
}
/deep/ body .ui-widget {
font-family: var(--font-family-sans-serif);
font-size: 1.1em;
line-height: 1.5;
}
/deep/ body .ui-widget-content {
border: 0;
}
/deep/ body .ui-splitbutton.ui-buttonset .ui-menu {
min-width: 100%;
}
/deep/ body .ui-menubar .ui-menuitem {
margin: 0;
}
/deep/ body .ui-menu .ui-menuitem-link,
/deep/ body .ui-menubar .ui-menuitem-link,
/deep/ body .ui-tieredmenu .ui-menuitem-link,
/deep/ body .ui-contextmenu .ui-menuitem-link,
/deep/ body .ui-megamenu .ui-menuitem-link,
/deep/ body .ui-slidemenu .ui-menuitem-link {
padding: 0.714em 0.857em;
color: #333333;
font-weight: normal;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
/deep/ body .ui-menu .ui-menuitem-link .ui-menuitem-text,
/deep/ body .ui-menubar .ui-menuitem-link .ui-menuitem-text,
/deep/ body .ui-tieredmenu .ui-menuitem-link .ui-menuitem-text,
/deep/ body .ui-contextmenu .ui-menuitem-link .ui-menuitem-text,
/deep/ body .ui-megamenu .ui-menuitem-link .ui-menuitem-text,
/deep/ body .ui-slidemenu .ui-menuitem-link .ui-menuitem-text {
// color: #333333;
color: var(--app-menu-button-color);
}
/deep/ body .ui-menu .ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-menubar .ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-tieredmenu .ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-contextmenu .ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-megamenu .ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-slidemenu .ui-menuitem-link .ui-menuitem-icon {
color: #333333;
margin-right: 0.5em;
}
/deep/ body .ui-menu .ui-menuitem-link:hover,
/deep/ body .ui-menubar .ui-menuitem-link:hover,
/deep/ body .ui-tieredmenu .ui-menuitem-link:hover,
/deep/ body .ui-contextmenu .ui-menuitem-link:hover,
/deep/ body .ui-megamenu .ui-menuitem-link:hover,
/deep/ body .ui-slidemenu .ui-menuitem-link:hover {
background-color: #eaeaea;
}
/deep/ body .ui-menu .ui-menuitem>.ui-menuitem-link:hover,
/deep/ body .ui-menubar .ui-menuitem>.ui-menuitem-link:hover,
/deep/ body .ui-tieredmenu .ui-menuitem>.ui-menuitem-link:hover,
/deep/ body .ui-slidemenu .ui-menuitem>.ui-menuitem-link:hover,
/deep/ body .ui-contextmenu .ui-menuitem>.ui-menuitem-link:hover,
/deep/ body .ui-megamenu .ui-menuitem>.ui-menuitem-link:hover {
background: var(--app-menu-button-hover-background-color);
}
/deep/ body .ui-menu .ui-menuitem-link:hover .ui-menuitem-text,
/deep/ body .ui-menubar .ui-menuitem-link:hover .ui-menuitem-text,
/deep/ body .ui-tieredmenu .ui-menuitem-link:hover .ui-menuitem-text,
/deep/ body .ui-contextmenu .ui-menuitem-link:hover .ui-menuitem-text,
/deep/ body .ui-megamenu .ui-menuitem-link:hover .ui-menuitem-text,
/deep/ body .ui-slidemenu .ui-menuitem-link:hover .ui-menuitem-text {
color: var(--app-menu-button-hover-color);
}
/deep/ body .ui-menu .ui-menuitem-link:hover .ui-menuitem-icon,
/deep/ body .ui-menubar .ui-menuitem-link:hover .ui-menuitem-icon,
/deep/ body .ui-tieredmenu .ui-menuitem-link:hover .ui-menuitem-icon,
/deep/ body .ui-contextmenu .ui-menuitem-link:hover .ui-menuitem-icon,
/deep/ body .ui-megamenu .ui-menuitem-link:hover .ui-menuitem-icon,
/deep/ body .ui-slidemenu .ui-menuitem-link:hover .ui-menuitem-icon {
color: #333333;
}
/deep/ body .ui-menubar .ui-menuitem.ui-menuitem-active>.ui-menuitem-link {
// background-color: #eaeaea;
background-color: var(--app-menu-button-active-background-color);
}
/deep/ body .ui-menubar .ui-menuitem.ui-menuitem-active>.ui-menuitem-link .ui-menuitem-text {
color: var(--app-menu-button-active-color);
}
/deep/ body .ui-menubar .ui-menuitem.ui-menuitem-active>.ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-menubar .ui-menuitem.ui-menuitem-active>.ui-menuitem-link .ui-submenu-icon {
color: #333333;
}
/deep/ body .ui-menu {
padding: 0;
background-color: #ffffff;
border: 1px solid #c8c8c8;
}
/deep/ body .ui-menu .ui-menuitem {
margin: 0;
}
/deep/ body .ui-menu.ui-shadow {
border: 1px solid #c8c8c8;
-webkit-box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
-moz-box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
}
/deep/ body .ui-menu .ui-submenu-header {
margin: 0;
padding: 0.714em 0.857em;
color: #ffffff;
background-color: #333333;
font-weight: 400;
border: 0 none;
}
/deep/ body .ui-menu .ui-menu-separator {
border: 1px solid #c8c8c8;
border-width: 1px 0 0 0;
}
/deep/ body .ui-menubar {
padding: 0; // background-color: #ffffff;
// border: 1px solid #c8c8c8;
background: linear-gradient(to bottom, #3b3f46 0%, #2b2e33 100%); // border-bottom: 1px solid #000;
}
/deep/ body .ui-menubar .ui-menubar-root-list>.ui-menuitem>.ui-menuitem-link {
padding: 0.01em 0.857em;
}
/deep/ body .ui-menubar .ui-submenu-list {
padding: 0; // background-color: #ffffff;
// border: 1px solid #c8c8c8;
// -webkit-box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
// -moz-box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
// box-shadow: 0 0px 6px 0 rgba(0, 0, 0, 0.16);
color: #1b1d1f;
background: var(--app-menu-pane-background-color); // /* Old browsers */
// background: -moz-linear-gradient(top, var(--app-menu-pane-background-color) 0%, #ebedf0 100%);
// /* FF3.6+ */
// background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, var(--app-menu-pane-background-color)), color-stop(100%, #ebedf0));
// /* Chrome,Safari4+ */
// background: -webkit-linear-gradient(top, var(--app-menu-pane-background-color) 0%, #ebedf0 100%);
// /* Chrome10+,Safari5.1+ */
// background: -o-linear-gradient(top, var(--app-menu-pane-background-color) 0%, #ebedf0 100%);
// /* Opera11.10+ */
// background: -ms-linear-gradient(top, var(--app-menu-pane-background-color) 0%, #ebedf0 100%);
// /* IE10+ */
// background: linear-gradient(to bottom, var(--app-menu-pane-background-color) 0%, #ebedf0 100%);
// /* W3C */
}
/deep/ body .ui-menubar .ui-submenu-list .ui-menuitem {
margin: 0;
}
/deep/ body .ui-menubar .ui-submenu-list .ui-menu-separator {
border: 1px solid var(--app-menu-divider-color);
border-width: 1px 0 0 0;
}
/deep/ body .ui-menubar .ui-submenu-list .ui-menuitem-text {
// color: #333333;
color: var(---app-menu-pane-color);
}
/deep/ body .ui-menubar .ui-menuitem .ui-submenu-list .ui-menuitem-active>.ui-menuitem-link {
// background-color: #eaeaea;
background-color: var(--link-button-hover-color);
}
/deep/ body .ui-menubar .ui-menuitem .ui-submenu-list .ui-menuitem-active>.ui-menuitem-link .ui-menuitem-text {
color: var(--button-text-color);
}
/deep/ body .ui-menubar .ui-menuitem .ui-submenu-list .ui-menuitem-active>.ui-menuitem-link .ui-menuitem-icon,
/deep/ body .ui-menubar .ui-menuitem .ui-submenu-list .ui-menuitem-active>.ui-menuitem-link .ui-submenu-icon {
color: #333333;
}
// /deep/ body .ui-menubar .ui-menuitem .ui-submenu-list .ui-menuitem:hover {
// background: #3b3f46;
// }
// /deep/ body .ui-menubar .ui-submenu-list:hover .ui-menuitem-text {
// color: var(--app-menu-pane-secondary-color);
// }
// /deep/ body .ui-menubar .ui-submenu-list:hover .ui-menuitem-icon {
// color: #333333;
// }

View File

@ -4,6 +4,7 @@ import { MenuItem } from 'primeng/primeng';
@Component({ @Component({
selector: 'app-menu-bar', selector: 'app-menu-bar',
templateUrl: './menu-bar.component.html', templateUrl: './menu-bar.component.html',
styleUrls: ['./menu-bar.component.scss'],
}) })
export class MenuBarComponent implements OnInit { export class MenuBarComponent implements OnInit {
@ -13,6 +14,49 @@ export class MenuBarComponent implements OnInit {
) { } ) { }
ngOnInit() { ngOnInit() {
this.items = [
{
label: 'File',
items: [
{ label: 'New' },
{ label: 'Open' },
{ separator: true },
{ label: 'Quit' }
]
},
{
label: 'Edit',
items: [
{ label: 'Delete' },
{ label: 'Refresh' }
]
},
{
label: 'Help',
items: [
{
label: 'Contents'
},
{
label: 'Search',
}
]
},
{
label: 'Actions',
items: [
{
label: 'Edit',
},
{
label: 'Other',
}
]
},
{
label: 'Quit',
}
];
} }
onTitlebarDoubleClick() { onTitlebarDoubleClick() {

View File

@ -15,7 +15,8 @@ export class AppComponent implements OnInit {
private electronProxyService: ElectronProxyService, private electronProxyService: ElectronProxyService,
private probeService: ProbeService, private probeService: ProbeService,
) { ) {
this.showTitleBar = !__LINUX__; // this.showTitleBar = !__LINUX__;
this.showTitleBar = true;
} }
ngOnInit(): void { ngOnInit(): void {

File diff suppressed because it is too large Load Diff