2009-Nissan-Cube / About-This-Hack

Discover your hardware on macOS with this simple, user-friendly hardware info app that retains the beloved design language of the classic 'About This Mac' interface, while gaining access to a wealth of additional features.
MIT License
290 stars 23 forks source link

Display Preferences button does nothing #73

Closed perez987 closed 1 year ago

perez987 commented 1 year ago

Good morning. I've tried last commit 2b04e7c and noticed that the Display Preferences button does nothing. No lines in the debug console when clicking it.

The command open /System/Library/PreferencePanes/Displays.prefPane in Terminal works. It's the command saved as displayPrefPane variable static var displayPrefPane = "/System/Library/PreferencePanes/Displays.prefPane" and called in ViewControllerDisplays.swift

    @IBAction func openPrefsDispl(_ sender: Any) {
        _ = run("open " + initGlobVar.displayPrefPane)
    }

@matxpa fork has the same behaviour. However, Slice's fork opens Display Preferences as expected.

matxpa commented 1 year ago

@perez987

Hi Yes you're right, but It happens only with en.lproj/Main.storyboard not with fr.lproj/Main.storyboard.

With a small modification in en.lproj/Main.storyboard the result is

Capture d’écran 2023-10-24 à 21 56 49

@0xCUB3 (en.lproj/Main.storyboard need to be modified and project too (fr.lproj/Main.storyboard is not activated (not added)) Modification is : to put Push Button Display Preferences... at the end of the list (and Displays at top) placed on the middle "Push Button Display Preferences..." seems to be inhibited by "Display Name Center" area

Capture d’écran 2023-10-24 à 22 00 57

Regards

perez987 commented 1 year ago

@matxpa You are right. Moving Display Preferences item to the end of the list fixes the issue. In your enroll version the item is in last place. In the Slice fork it is in second to last place. That's why the issue was not present in both repos. About Display Name Center, the only requirement I have seen is that it be before Display Preferences. Thanks!!!

perez987 commented 1 year ago

Closing the issue as resolved.