on xenial help sign in
MenuItemFactory: use BaseLayoutMenu for creating the special messagesButtonMenu
f4455d2Marco Trevisan (Treviño)
qml/Panel/Indicators/MenuItemFactory.qml+7−16
@@ -181,29 +181,20 @@ Item {
181 Component {
181 Component {
182 id: messagesButtonMenu;
182 id: messagesButtonMenu;
183
183
184− Item {
184+ Menus.BaseLayoutMenu {
185 objectName: "messagesButtonMenu"
185 objectName: "messagesButtonMenu"
186 property QtObject menuData: null
186 property QtObject menuData: null
187 property var menuModel: menuFactory.menuModel
187 property var menuModel: menuFactory.menuModel
188 property int menuIndex: -1
188 property int menuIndex: -1
189
189
190− implicitHeight: units.gu(5)
190+ highlightWhenPressed: false
191 enabled: menuData && menuData.sensitive || false
191 enabled: menuData && menuData.sensitive || false
192+ text: menuData && menuData.label || ""
193+ title.color: theme.palette.selected.backgroundText
194+ title.horizontalAlignment: Text.AlignHCenter
195+ title.font.bold: true
192
196
193− Label {
194− id: buttonMenuLabel
195− text: menuData && menuData.label || ""
196− anchors.centerIn: parent
197− font.bold: true
198− }
199−
200− MouseArea {
201− anchors {
202− fill: buttonMenuLabel
203− margins: units.gu(-1)
204− }
205− onClicked: menuModel.activate(menuIndex);
197+ onClicked: menuModel.activate(menuIndex);
206− }
207 }
198 }
208 }
199 }
209
200