mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
navbar aside menu button
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
|
||||
$toolbar-order-ios: (
|
||||
back-button: 10,
|
||||
primary: 20,
|
||||
title: 30,
|
||||
secondary: 40
|
||||
aside-toggle: 20,
|
||||
primary: 30,
|
||||
title: 40,
|
||||
secondary: 50
|
||||
);
|
||||
|
||||
$toolbar-ios-height: 4.4rem !default;
|
||||
@@ -33,6 +34,10 @@ $toolbar-ios-title-font-size: 1.7rem !default;
|
||||
order: map-get($toolbar-order-ios, secondary);
|
||||
}
|
||||
|
||||
[aside-toggle] {
|
||||
order: map-get($toolbar-order-ios, 'aside-toggle');
|
||||
}
|
||||
|
||||
ion-title {
|
||||
font-size: $toolbar-ios-title-font-size;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
$toolbar-order: (
|
||||
backButton: 10,
|
||||
title: 20,
|
||||
primary: 30,
|
||||
secondary: 40
|
||||
aside-toggle: 20,
|
||||
title: 30,
|
||||
primary: 40,
|
||||
secondary: 50
|
||||
);
|
||||
|
||||
|
||||
@@ -75,6 +76,19 @@ ion-title {
|
||||
color: $toolbar-text-color;
|
||||
}
|
||||
|
||||
.toolbar [aside-toggle] {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: 32px;
|
||||
min-width: 32px;
|
||||
order: map-get($toolbar-order, 'aside-toggle');
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.toolbar [aside-toggle] icon {
|
||||
padding: 0 0.9em;
|
||||
}
|
||||
|
||||
.toolbar-item {
|
||||
transform: translateZ(0px);
|
||||
}
|
||||
|
||||
@@ -51,12 +51,23 @@ export class ToolbarBase extends Ion {
|
||||
return this._ttTxt;
|
||||
}
|
||||
|
||||
onAllChangesDone() {
|
||||
if (this._queueAlign) {
|
||||
this._queueAlign = false;
|
||||
this._alignTitle();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
alignTitle() {
|
||||
this._queueAlign = (this.titleAlign === 'center');
|
||||
}
|
||||
|
||||
_alignTitle() {
|
||||
// don't bother if we're not trying to center align the title
|
||||
if (this.titleAlign !== 'center' || this.aligned) return;
|
||||
if (this.aligned) return;
|
||||
|
||||
// called after the navbar/title has had a moment to
|
||||
// finish rendering in their correct locations
|
||||
|
||||
Reference in New Issue
Block a user