Skip to content

Commit

Permalink
Clean up and prettify the Selector dialog
Browse files Browse the repository at this point in the history
Contributes-To: #40
  • Loading branch information
nephros authored and Peter G. (nephros) committed May 23, 2023
1 parent bd58e56 commit ef91ab5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
4 changes: 1 addition & 3 deletions qml/components/CatSelect.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ ComboBox {
label: qsTr("Category")
value: (catModel.count > 0 && currentIndex >=0) ? catModel.get(currentIndex).displayName : qsTr("None")
description: (catModel.count > 0 && currentIndex >=0) ? catModel.get(currentIndex).description : qsTr("Bug Category")
//value: qsTr("Please Select")
//currentIndex: 0
ContextMenu { id: cmenu
property alias entries: entriesrep.model
Repeater { id: entriesrep
delegate: MenuItem { text: (description.length > 0) ? description : displayName }
delegate: MenuItem { text: Theme.highlightText(displayName + ((description.length >0) ? ": " + description : ""), displayName, Theme.highlightColor) }
}
}
}
Expand Down
24 changes: 13 additions & 11 deletions qml/config/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/*
* When adding a category, add it at the end!!
*
* Also, don't repeat the display name in the description, it makes the highlight look ugly.
*
*/
var data = {
"categories": [
Expand All @@ -12,37 +14,37 @@ var data = {
"description": ""
},
{ "name": "backup", "displayName": "Backup",
"description": "The Sailfish Backup system"
"description": "The Sailfish vault system"
},
{ "name": "bluetooth", "displayName": "Bluetooth",
"description": "Bluetooth connection or devices"
"description": "BT connection or devices"
},
{ "name": "browser", "displayName": "Browser",
"description": "Web browsing"
},
{ "name": "calendar", "displayName": "Calendar",
"description": "Calendar sync or management problems"
"description": "sync or management of events"
},
{ "name": "contacts", "displayName": "Contacts",
"description": "Contact sync or management problems"
"description": "sync or management of contact information"
},
{ "name": "exchange", "displayName": "Exchange",
"description": "Exchange/O356 sync or management problems"
"description": "Outlook or Office356 accounts"
},
{ "name": "fingerprint", "displayName": "Fingerprint",
"description": "Fingerprint Reader"
"description": ""
},
{ "name": "mail", "displayName": "EMail",
"description": "General EMail"
"description": "General mail"
},
{ "name": "media_tracker", "displayName": "Media Indexing",
"description": "Media Player remote control (MPRIS)"
"description": "Music, Image, and Video metadata"
},
{ "name": "mobile_data", "displayName": "Mobile Data",
"description": ""
"description": "SIM cards, reception, switching, roaming"
},
{ "name": "mpris", "displayName": "MPRIS",
"description": ""
"description": "Media Player remote control"
},
{ "name": "native_app", "displayName": "SFOS App",
"description": "Sailfish stock apps"
Expand All @@ -57,7 +59,7 @@ var data = {
"description": "Out-of-memory conditions"
},
{ "name": "positioning", "displayName": "Positioning",
"description": "GPS and other positioning methods"
"description": "GPS and other geolocation methods"
},
]
}
Expand Down
4 changes: 1 addition & 3 deletions qml/pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,13 @@ Page {
}
Separator { color: Theme.primaryColor; horizontalAlignment: Qt.AlignHCenter; width: page.width}
SectionHeader { text: qsTr("Additional Information") }
CatSelect { id: metacat
onCategoryChanged: metatags["category"] = category;
}
TextArea{id: text_add;
width: parent.width; height: Math.max(implicitHeight, Theme.itemSizeLarge);
label: qsTr("Add any other information")
description: qsTr("e.g. links to logs or screenshots.")
onFocusChanged: shallSave();
}
CatSelect { onCategoryChanged: metatags["category"] = category; }
Slider { id: repro;
width: parent.width;
label: qsTr("Reproducibility");
Expand Down

0 comments on commit ef91ab5

Please sign in to comment.