mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
Merge branch 'master' of github.com:bbedward/DankMaterialShell
This commit is contained in:
@@ -88,10 +88,20 @@ Singleton {
|
|||||||
property string notepadFontFamily: ""
|
property string notepadFontFamily: ""
|
||||||
property real notepadFontSize: 14
|
property real notepadFontSize: 14
|
||||||
property bool notepadShowLineNumbers: false
|
property bool notepadShowLineNumbers: false
|
||||||
|
property real notepadTransparencyOverride: -1
|
||||||
|
property real notepadLastCustomTransparency: 0.7
|
||||||
|
|
||||||
onNotepadUseMonospaceChanged: saveSettings()
|
onNotepadUseMonospaceChanged: saveSettings()
|
||||||
onNotepadFontFamilyChanged: saveSettings()
|
onNotepadFontFamilyChanged: saveSettings()
|
||||||
onNotepadFontSizeChanged: saveSettings()
|
onNotepadFontSizeChanged: saveSettings()
|
||||||
onNotepadShowLineNumbersChanged: saveSettings()
|
onNotepadShowLineNumbersChanged: saveSettings()
|
||||||
|
onNotepadTransparencyOverrideChanged: {
|
||||||
|
if (notepadTransparencyOverride > 0) {
|
||||||
|
notepadLastCustomTransparency = notepadTransparencyOverride
|
||||||
|
}
|
||||||
|
saveSettings()
|
||||||
|
}
|
||||||
|
onNotepadLastCustomTransparencyChanged: saveSettings()
|
||||||
property bool gtkThemingEnabled: false
|
property bool gtkThemingEnabled: false
|
||||||
property bool qtThemingEnabled: false
|
property bool qtThemingEnabled: false
|
||||||
property bool showDock: false
|
property bool showDock: false
|
||||||
@@ -267,6 +277,8 @@ Singleton {
|
|||||||
notepadFontFamily = settings.notepadFontFamily !== undefined ? settings.notepadFontFamily : ""
|
notepadFontFamily = settings.notepadFontFamily !== undefined ? settings.notepadFontFamily : ""
|
||||||
notepadFontSize = settings.notepadFontSize !== undefined ? settings.notepadFontSize : 14
|
notepadFontSize = settings.notepadFontSize !== undefined ? settings.notepadFontSize : 14
|
||||||
notepadShowLineNumbers = settings.notepadShowLineNumbers !== undefined ? settings.notepadShowLineNumbers : false
|
notepadShowLineNumbers = settings.notepadShowLineNumbers !== undefined ? settings.notepadShowLineNumbers : false
|
||||||
|
notepadTransparencyOverride = settings.notepadTransparencyOverride !== undefined ? settings.notepadTransparencyOverride : -1
|
||||||
|
notepadLastCustomTransparency = settings.notepadLastCustomTransparency !== undefined ? settings.notepadLastCustomTransparency : 0.95
|
||||||
gtkThemingEnabled = settings.gtkThemingEnabled !== undefined ? settings.gtkThemingEnabled : false
|
gtkThemingEnabled = settings.gtkThemingEnabled !== undefined ? settings.gtkThemingEnabled : false
|
||||||
qtThemingEnabled = settings.qtThemingEnabled !== undefined ? settings.qtThemingEnabled : false
|
qtThemingEnabled = settings.qtThemingEnabled !== undefined ? settings.qtThemingEnabled : false
|
||||||
showDock = settings.showDock !== undefined ? settings.showDock : false
|
showDock = settings.showDock !== undefined ? settings.showDock : false
|
||||||
@@ -374,6 +386,8 @@ Singleton {
|
|||||||
"notepadFontFamily": notepadFontFamily,
|
"notepadFontFamily": notepadFontFamily,
|
||||||
"notepadFontSize": notepadFontSize,
|
"notepadFontSize": notepadFontSize,
|
||||||
"notepadShowLineNumbers": notepadShowLineNumbers,
|
"notepadShowLineNumbers": notepadShowLineNumbers,
|
||||||
|
"notepadTransparencyOverride": notepadTransparencyOverride,
|
||||||
|
"notepadLastCustomTransparency": notepadLastCustomTransparency,
|
||||||
"gtkThemingEnabled": gtkThemingEnabled,
|
"gtkThemingEnabled": gtkThemingEnabled,
|
||||||
"qtThemingEnabled": qtThemingEnabled,
|
"qtThemingEnabled": qtThemingEnabled,
|
||||||
"showDock": showDock,
|
"showDock": showDock,
|
||||||
|
|||||||
@@ -335,6 +335,8 @@ Singleton {
|
|||||||
return Qt.rgba(surfaceContainer.r, surfaceContainer.g, surfaceContainer.b, panelTransparency)
|
return Qt.rgba(surfaceContainer.r, surfaceContainer.g, surfaceContainer.b, panelTransparency)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property real notepadTransparency: SettingsData.notepadTransparencyOverride >= 0 ? SettingsData.notepadTransparencyOverride : popupTransparency
|
||||||
|
|
||||||
function widgetBackground() {
|
function widgetBackground() {
|
||||||
return Qt.rgba(surfaceContainer.r, surfaceContainer.g, surfaceContainer.b, widgetTransparency)
|
return Qt.rgba(surfaceContainer.r, surfaceContainer.g, surfaceContainer.b, widgetTransparency)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ Item {
|
|||||||
width: 360
|
width: 360
|
||||||
height: settingsColumn.implicitHeight + Theme.spacingXL * 2
|
height: settingsColumn.implicitHeight + Theme.spacingXL * 2
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: Theme.popupBackground()
|
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, Theme.notepadTransparency)
|
||||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
z: 100
|
z: 100
|
||||||
@@ -265,6 +265,53 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: transparencySliderColumn.height + Theme.spacingS
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: transparencySliderColumn
|
||||||
|
width: parent.width
|
||||||
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
|
DankToggle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: -Theme.spacingM
|
||||||
|
width: parent.width + Theme.spacingM
|
||||||
|
text: "Custom Transparency"
|
||||||
|
description: "Override global transparency for Notepad"
|
||||||
|
checked: SettingsData.notepadTransparencyOverride >= 0
|
||||||
|
onToggled: checked => {
|
||||||
|
if (checked) {
|
||||||
|
SettingsData.notepadTransparencyOverride = SettingsData.notepadLastCustomTransparency
|
||||||
|
} else {
|
||||||
|
SettingsData.notepadTransparencyOverride = -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DankSlider {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: -Theme.spacingM
|
||||||
|
width: parent.width + Theme.spacingM
|
||||||
|
height: 24
|
||||||
|
visible: SettingsData.notepadTransparencyOverride >= 0
|
||||||
|
value: Math.round((SettingsData.notepadTransparencyOverride >= 0 ? SettingsData.notepadTransparencyOverride : SettingsData.popupTransparency) * 100)
|
||||||
|
minimum: 0
|
||||||
|
maximum: 100
|
||||||
|
unit: ""
|
||||||
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
|
onSliderValueChanged: newValue => {
|
||||||
|
if (SettingsData.notepadTransparencyOverride >= 0) {
|
||||||
|
SettingsData.notepadTransparencyOverride = newValue / 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: SettingsData.notepadUseMonospace ?
|
text: SettingsData.notepadUseMonospace ?
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ Column {
|
|||||||
StyledRect {
|
StyledRect {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height - bottomControls.height - Theme.spacingM
|
height: parent.height - bottomControls.height - Theme.spacingM
|
||||||
color: Theme.surface
|
color: Qt.rgba(Theme.surface.r, Theme.surface.g, Theme.surface.b, Theme.notepadTransparency)
|
||||||
border.color: Theme.outlineMedium
|
border.color: Theme.outlineMedium
|
||||||
border.width: 1
|
border.width: 1
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
@@ -329,6 +329,7 @@ Column {
|
|||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceTextMedium
|
color: Theme.surfaceTextMedium
|
||||||
visible: textArea.text.length > 0
|
visible: textArea.text.length > 0
|
||||||
|
opacity: 1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
@@ -359,7 +360,7 @@ Column {
|
|||||||
return Theme.success
|
return Theme.success
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opacity: textArea.text.length > 0 ? 1 : 0
|
opacity: textArea.text.length > 0 ? 1.0 : 0.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ PanelWindow {
|
|||||||
property Component content: null
|
property Component content: null
|
||||||
property string title: ""
|
property string title: ""
|
||||||
property alias container: contentContainer
|
property alias container: contentContainer
|
||||||
|
property real customTransparency: -1
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
visible = true
|
visible = true
|
||||||
@@ -61,17 +62,11 @@ PanelWindow {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
width: expandable && expandedWidth ? expandedWidthValue : slideoutWidth
|
width: expandable && expandedWidth ? expandedWidthValue : slideoutWidth
|
||||||
color: Theme.surfaceContainer
|
color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b,
|
||||||
|
customTransparency >= 0 ? customTransparency : SettingsData.popupTransparency)
|
||||||
border.color: Theme.outlineMedium
|
border.color: Theme.outlineMedium
|
||||||
border.width: 1
|
border.width: 1
|
||||||
opacity: isVisible ? SettingsData.popupTransparency : 0
|
visible: isVisible
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
NumberAnimation {
|
|
||||||
duration: 700
|
|
||||||
easing.type: Easing.OutCubic
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
transform: Translate {
|
transform: Translate {
|
||||||
id: slideTransform
|
id: slideTransform
|
||||||
|
|||||||
Reference in New Issue
Block a user