p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
13.1k stars 551 forks source link

[2.0.0.beta.12] popover height is not preserved if there are few items #848

Closed 750 closed 3 months ago

750 commented 3 months ago

Before Submitting Your Bug Report

Maccy Version (see 'About' window)

 2.0.0.beta.12

macOS Version

sonoma 14.5

Maccy Settings

<details>
  <summary> Maccy Settings </summary>
'''json
{
    "KeyboardShortcuts_delete" = "{\\"carbonKeyCode\\":51,\\"carbonModifiers\\":2048}";
    "KeyboardShortcuts_pin" = "{\\"carbonKeyCode\\":35,\\"carbonModifiers\\":2048}";
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":8}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSStatusItem Preferred Position Item-0" = 338;
    "NSStatusItem Visible Item-1" = 0;
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "469 344 510 473 0 0 1470 919 ";
    SUAutomaticallyUpdate = 0;
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2024-08-20 22:02:11 +0000";
    SUSendProfileInfo = 0;
    SUUpdateGroupIdentifier = 412656639;
    avoidTakingFocus = 1;
    enabledPasteboardTypes =     (
        "public.rtf",
        "public.html",
        "public.png",
        "public.tiff",
        "public.file-url",
        "public.utf8-plain-text"
    );
    historySize = 999;
    ignoredPasteboardTypes =     (
        "net.antelle.keeweb",
        "com.typeit4me.clipping",
        "com.agilebits.onepassword",
        "de.petermaurer.TransientPasteboardType",
        "Pasteboard generator type"
    );
    maxMenuItemLength = 30;
    migrations =     {
        "2024-07-01-version-2" = 1;
    };
    pasteByDefault = 1;
    popupPosition = lastPosition;
    popupScreen = 0;
    previewDelay = 1000;
    showFooter = 1;
    showRecentCopyInMenuBar = 0;
    showSearch = 1;
    showTitle = 0;
    suppressClearAlert = 1;
    windowPosition = "[0.8115646258503402,0.940152339499456]";
    windowSize = "[554,784]";
}

'''  
</details>

Description

If I have 10 items and resize popover to be higher then all those items, popover becomes smaller on reopen (to fit those items exactly). If I then copy more items, popover becomes bigger until I copy too many items - it seems that the height is stored, but on popover defaults to something like height=min(saved_height, exact_fit_height) on reopen

Steps to Reproduce

  1. Clear stored items
  2. Open popover
  3. Resize popover to be full screen height
  4. Reopen popover and witness it become short

Screencast:

https://github.com/user-attachments/assets/4c0d0603-d094-4d4b-b41f-dbe4f7c8b18f

weisJ commented 3 months ago

This is actually the intended behaviour

p0deje commented 3 months ago

@weisJ Is correct, Maccy would do its best to avoid showing empty space.

750 commented 3 months ago

Understood, thanks