fixed : label disappear in workspace

- closes : #5256
This commit is contained in:
MrSluffy
2025-02-15 07:32:37 +08:00
parent 473121ad53
commit a0b5a17ca8
3 changed files with 12 additions and 8 deletions

View File

@@ -849,9 +849,11 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
// Text should be visible everywhere but the hotseat.
Object tag = getParent() instanceof FolderIcon ? ((View) getParent()).getTag() : getTag();
ItemInfo info = tag instanceof ItemInfo ? (ItemInfo) tag : null;
return info == null || ((info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT
&& info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION)
&& !PreferenceExtensionsKt.firstBlocking(pref2.getEnableLabelInDock()));
if (info != null && (info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT
&& info.container != LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION)) {
return !PreferenceExtensionsKt.firstBlocking(pref2.getEnableLabelInDock());
}
return true;
}
public void setTextVisibility(boolean visible) {

View File

@@ -757,10 +757,12 @@ public class CellLayout extends ViewGroup {
CellLayoutLayoutParams params, boolean markCells) {
final CellLayoutLayoutParams lp = params;
// Hotseat icons - remove text
if (child instanceof BubbleTextView) {
BubbleTextView bubbleChild = (BubbleTextView) child;
bubbleChild.setTextVisibility(PreferenceExtensionsKt.firstBlocking(pref.getEnableLabelInDock()));
// Hotseat icons - modified by lawnchair
if (child instanceof BubbleTextView bubbleChild) {
boolean enableLabel = mContainerType == HOTSEAT
? PreferenceExtensionsKt.firstBlocking(pref.getEnableLabelInDock())
: true;
bubbleChild.setTextVisibility(enableLabel);
}
child.setScaleX(DEFAULT_SCALE);

View File

@@ -938,7 +938,7 @@ public class DeviceProfile {
hotseatCellHeightPx = getIconSizeWithOverlap(hotseatIconSizePx * 2) - hotseatIconSizePx / 2;
hotseatCellHeightPx += isLabelInDock ? iconTextHeight : 0;
hotseatQsbSpace += isLabelInDock ? iconTextHeight : 0;
hotseatQsbSpace += isLabelInDock ? (iconTextHeight / 2) : 0;
var space = Math.abs(hotseatCellHeightPx / 2) - 16;