forked from qt-creator/qt-creator
QmlDesigner: Use a different color for unimported items section
Fixes: QDS-3873 Change-Id: Ic713353d8fe5c1bfb4ff11f1224294ecde182fa7 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -31,6 +31,9 @@ import StudioTheme 1.0 as StudioTheme
|
||||
|
||||
Item {
|
||||
id: delegateRoot
|
||||
|
||||
property alias textColor: text.color
|
||||
|
||||
signal showContextMenu()
|
||||
|
||||
Rectangle {
|
||||
|
@@ -155,6 +155,8 @@ ScrollView {
|
||||
sectionHeight: 30
|
||||
sectionFontSize: 15
|
||||
showArrow: categoryModel.rowCount() > 0
|
||||
labelColor: importUnimported ? StudioTheme.Values.themeUnimportedModuleColor
|
||||
: StudioTheme.Values.themeTextColor
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
topPadding: 0
|
||||
@@ -204,6 +206,8 @@ ScrollView {
|
||||
model: itemModel
|
||||
delegate: ItemDelegate {
|
||||
visible: itemVisible
|
||||
textColor: importUnimported ? StudioTheme.Values.themeUnimportedModuleColor
|
||||
: StudioTheme.Values.themeTextColor
|
||||
width: styleConstants.cellWidth + itemGrid.flexibleWidth
|
||||
height: styleConstants.cellHeight
|
||||
onShowContextMenu: {
|
||||
|
@@ -32,6 +32,7 @@ import StudioTheme 1.0 as StudioTheme
|
||||
Item {
|
||||
id: section
|
||||
property alias caption: label.text
|
||||
property alias labelColor: label.color
|
||||
property alias sectionHeight: header.height
|
||||
property alias sectionBackgroundColor: header.color
|
||||
property alias sectionFontSize: label.font.pixelSize
|
||||
|
@@ -198,6 +198,8 @@ QtObject {
|
||||
property string themeStateBackground: Theme.color(Theme.DSstateBackgroundColor)
|
||||
property string themeStatePreviewOutline: Theme.color(Theme.DSstatePreviewOutline)
|
||||
|
||||
property string themeUnimportedModuleColor: "#e33c2e"
|
||||
|
||||
// Taken out of Constants.js
|
||||
property string themeChangedStateText: Theme.color(Theme.DSchangedStateText)
|
||||
|
||||
|
@@ -42,6 +42,7 @@ class ItemLibraryImport : public QObject
|
||||
Q_PROPERTY(bool importUsed READ importUsed NOTIFY importUsedChanged FINAL)
|
||||
Q_PROPERTY(bool importExpanded READ importExpanded WRITE setImportExpanded NOTIFY importExpandChanged FINAL)
|
||||
Q_PROPERTY(bool importRemovable READ importRemovable NOTIFY importRemovableChanged FINAL)
|
||||
Q_PROPERTY(bool importUnimported READ importUnimported FINAL)
|
||||
Q_PROPERTY(QObject *categoryModel READ categoryModel NOTIFY categoryModelChanged FINAL)
|
||||
|
||||
public:
|
||||
@@ -90,6 +91,7 @@ signals:
|
||||
|
||||
private:
|
||||
void updateRemovable();
|
||||
bool importUnimported() const { return m_sectionType == SectionType::Unimported; }
|
||||
|
||||
Import m_import;
|
||||
bool m_importExpanded = true;
|
||||
|
Reference in New Issue
Block a user