mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-26 22:42:50 -05:00
refactor: perf improvement stopping singletons with ref
Also switch to scale+opacity anims with custom curve
This commit is contained in:
@@ -19,8 +19,6 @@ DankModal {
|
||||
|
||||
function show() {
|
||||
processListModal.visible = true;
|
||||
ProcessMonitorService.updateSystemInfo();
|
||||
ProcessMonitorService.updateProcessList();
|
||||
SystemMonitorService.enableDetailedMonitoring(true);
|
||||
SystemMonitorService.updateSystemInfo();
|
||||
UserInfoService.getUptime();
|
||||
@@ -46,9 +44,10 @@ DankModal {
|
||||
cornerRadius: Theme.cornerRadiusXLarge
|
||||
enableShadow: true
|
||||
|
||||
onVisibleChanged: {
|
||||
ProcessMonitorService.enableMonitoring(visible);
|
||||
Ref {
|
||||
service: ProcessMonitorService
|
||||
}
|
||||
|
||||
|
||||
onBackgroundClicked: hide()
|
||||
|
||||
|
||||
@@ -71,7 +71,9 @@ DankModal {
|
||||
gridColumns: 4
|
||||
|
||||
onAppLaunched: hide()
|
||||
onViewModeSelected: Prefs.setSpotlightModalViewMode(mode)
|
||||
onViewModeSelected: function(mode) {
|
||||
Prefs.setSpotlightModalViewMode(mode);
|
||||
}
|
||||
}
|
||||
|
||||
content: Component {
|
||||
@@ -265,12 +267,16 @@ DankModal {
|
||||
iconSize: 40
|
||||
showDescription: true
|
||||
hoverUpdatesSelection: false
|
||||
keyboardNavigationActive: appLauncher.keyboardNavigationActive
|
||||
onItemClicked: function(index, modelData) {
|
||||
appLauncher.launchApp(modelData);
|
||||
}
|
||||
onItemHovered: function(index) {
|
||||
appLauncher.selectedIndex = index;
|
||||
}
|
||||
onKeyboardNavigationReset: {
|
||||
appLauncher.keyboardNavigationActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Grid view
|
||||
@@ -288,12 +294,16 @@ DankModal {
|
||||
maxIconSize: 48
|
||||
currentIndex: appLauncher.selectedIndex
|
||||
hoverUpdatesSelection: false
|
||||
keyboardNavigationActive: appLauncher.keyboardNavigationActive
|
||||
onItemClicked: function(index, modelData) {
|
||||
appLauncher.launchApp(modelData);
|
||||
}
|
||||
onItemHovered: function(index) {
|
||||
appLauncher.selectedIndex = index;
|
||||
}
|
||||
onKeyboardNavigationReset: {
|
||||
appLauncher.keyboardNavigationActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user