forked from openkylin/ukui-menu
完善右侧文字跟随高亮,调整布局;添加全屏模式下的菜单选择按钮反色
This commit is contained in:
parent
7d73728b0f
commit
8f810334cb
|
@ -5,7 +5,7 @@
|
|||
<name>UkuiMenu::RecentFileExtension</name>
|
||||
<message>
|
||||
<source>Recent Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>最近</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open</source>
|
||||
|
|
|
@ -74,7 +74,6 @@ RowLayout {
|
|||
width: parent.width
|
||||
height: contentHeight > parent.height ? parent.height : contentHeight
|
||||
interactive: contentHeight > parent.height
|
||||
spacing: 5
|
||||
|
||||
highlightMoveDuration: animationDuration
|
||||
highlight: AppControls2.StyleBackground {
|
||||
|
|
|
@ -35,6 +35,8 @@ RowLayout {
|
|||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: height
|
||||
|
||||
highlight: mainWindow.isFullScreen
|
||||
autoHighLight: !mainWindow.isFullScreen
|
||||
buttonIcon: "image://appicon/ukui-selected"
|
||||
onClicked: pluginSelectMenuRoot.model.autoSwitchProvider();
|
||||
}
|
||||
|
|
|
@ -35,12 +35,15 @@ Item {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 40
|
||||
Layout.rightMargin: 12
|
||||
Layout.leftMargin: 16
|
||||
|
||||
ListView {
|
||||
id: extensionListView
|
||||
width: parent.width - 34
|
||||
height: parent.height
|
||||
clip: true
|
||||
spacing: 24
|
||||
interactive: false
|
||||
orientation: ListView.Horizontal
|
||||
model: extensionManager.extensionModel()
|
||||
delegate: headerDelegate
|
||||
|
@ -147,7 +150,7 @@ Item {
|
|||
|
||||
Item {
|
||||
property var extensionData: model.data
|
||||
width: 100
|
||||
width: styleText.width
|
||||
height: ListView.view ? ListView.view.height : 0
|
||||
|
||||
onExtensionDataChanged: {
|
||||
|
@ -162,14 +165,15 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.fill: parent
|
||||
AppControls2.StyleText {
|
||||
height: parent.height
|
||||
id: styleText
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.bold: true
|
||||
font.bold: parent.ListView.isCurrentItem
|
||||
wrapMode: Text.ElideRight
|
||||
|
||||
color: parent.ListView.isCurrentItem ? "blue" : "black"
|
||||
paletteRole: parent.ListView.isCurrentItem ? Palette.Highlight: Palette.Text
|
||||
text: model.name
|
||||
}
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
<name>UkuiMenu::FavoriteExtension</name>
|
||||
<message>
|
||||
<source>Favorite</source>
|
||||
<translation>收藏夹</translation>
|
||||
<translation>收藏</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
Loading…
Reference in New Issue