feat: Reimplement Hotseat, and Favorite application label toggle
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
1 parent
accc3e8a10
commit
fdcd97fcd9
2 files changed
+27
-4
No files matched your search
@@ -1024,20 +1024,39 @@ public class DeviceProfile {
|
||||
|
||||
/** Updates hotseatCellHeightPx and hotseatBarSizePx */
|
||||
private void updateHotseatSizes(int hotseatIconSizePx) {
|
||||
int iconTextHeight = Utilities.calculateTextHeight(iconTextSizePx);
|
||||
boolean isLabelInDock = PreferenceExtensionsKt.firstBlocking(preferenceManager2.getEnableLabelInDock());
|
||||
// Ensure there is enough space for folder icons, which have a slightly larger radius.
|
||||
hotseatCellHeightPx = getIconSizeWithOverlap(hotseatIconSizePx);
|
||||
hotseatCellHeightPx = getIconSizeWithOverlap(hotseatIconSizePx * 2) - hotseatIconSizePx / 2;
|
||||
hotseatCellHeightPx += isLabelInDock ? iconTextHeight : 0;
|
||||
hotseatQsbSpace += isLabelInDock ? (iconTextHeight / 2) : 0;
|
||||
|
||||
int space = Math.abs(hotseatCellHeightPx / 2) - 16;
|
||||
if (!isLabelInDock) {
|
||||
space -= iconTextHeight;
|
||||
}
|
||||
|
||||
hotseatBarBottomSpacePx *= PreferenceExtensionsKt
|
||||
.firstBlocking(preferenceManager2.getHotseatBottomFactor());
|
||||
|
||||
if (isVerticalBarLayout()) {
|
||||
hotseatBarSizePx = hotseatIconSizePx + mHotseatBarEdgePaddingPx
|
||||
+ mHotseatBarWorkspaceSpacePx;
|
||||
+ mHotseatBarWorkspaceSpacePx
|
||||
+ space;
|
||||
} else if (isQsbInline) {
|
||||
hotseatBarSizePx = Math.max(hotseatIconSizePx, hotseatQsbVisualHeight)
|
||||
+ hotseatBarBottomSpacePx;
|
||||
+ hotseatBarBottomSpacePx
|
||||
+ space;
|
||||
} else {
|
||||
hotseatBarSizePx = hotseatIconSizePx
|
||||
+ hotseatQsbSpace
|
||||
+ hotseatQsbVisualHeight
|
||||
+ hotseatBarBottomSpacePx;
|
||||
+ hotseatBarBottomSpacePx
|
||||
+ space;
|
||||
}
|
||||
var isHotseatEnabled = PreferenceExtensionsKt.firstBlocking(preferenceManager2.isHotseatEnabled());
|
||||
if (!isHotseatEnabled) {
|
||||
hotseatBarSizePx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user