cogentcore / core

A free and open source framework for building powerful, fast, and elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the Web with a single pure Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.31k stars 71 forks source link

default spacing is really too big #909

Open rcoreilly opened 4 months ago

rcoreilly commented 4 months ago

Describe the bug

maybe have that be the default on mobile, but on desktop, it is just crazy spaced for a default.

How to reproduce

run anything. expt with spacing option in settings.

Example code

No response

Relevant output

No response

Platform

macOS

ddkwork commented 4 months ago

I have same problem

kkoreilly commented 4 months ago

This is simply not true. Our current default spacing is good for user-friendly applications and is consistent with that of Material Design. The user is always free to set the spacing to something else.

ddkwork commented 4 months ago

I have same thing{F7B5CD03-0025-47fd-9384-01A955CCA7CB}.png

not working

kkoreilly commented 4 months ago

The appearance settings zoom and spacing are based around 0-100, not 0-1, so those should be 50 and 70, respectively. However, again, I would recommend against hardcoding the settings in your code, as that prevents people from changing them. I will look into figuring out better default spacing settings, but you should not force your opinion in your app; on some computers, you need a much bigger or smaller zoom. Once you set your settings in the app, they will be saved and persist for all apps on that device.

ddkwork commented 4 months ago

Again, I feel like you're pointing out the maze, it's strange that my Android phone and tablet are very suitable for this ratio, by the way, I also have an all-in-one computer and another laptop next to me, I'll compile exe to them later for testing, if the ratio is still appropriate, then I'm here for 4 devices that are suitable for this ratio, and I'll report back to you after I test, after all, I can't see the less tested.

---Original--- From: @.> Date: Thu, Feb 29, 2024 23:43 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] default spacing is really too big (Issue #909)

The appearance settings zoom and spacing are based around 0-100, not 0-1, so those should be 50 and 70, respectively. However, again, I would recommend against hardcoding the settings in your code, as that prevents people from changing them. I will look into figuring out better default spacing settings, but you should not force your opinion in your app; on some computers, you need a much bigger or smaller zoom. Once you set your settings in the app, they will be saved and persist for all apps on that device.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 4 months ago

{6AD7D576-EA1C-4adb-AC57-D3AE42514331}.png

ddkwork commented 4 months ago

Unfortunately, I can't install the VK driver for the other two devices, they are old devices and don't support VK, so I can't test it, so let's do it first, regardless of this problem, just adjust it manually

---Original--- From: @.> Date: Thu, Feb 29, 2024 23:43 PM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] default spacing is really too big (Issue #909)

The appearance settings zoom and spacing are based around 0-100, not 0-1, so those should be 50 and 70, respectively. However, again, I would recommend against hardcoding the settings in your code, as that prevents people from changing them. I will look into figuring out better default spacing settings, but you should not force your opinion in your app; on some computers, you need a much bigger or smaller zoom. Once you set your settings in the app, they will be saved and persist for all apps on that device.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kkoreilly commented 4 months ago

Did you restart the app after you changed the system scaling factor? Do you have a different font size specified in your accessibility settings? Can you send me a screenshot of Inspect > Inspect app > Screens > right click > Edit?

ddkwork commented 4 months ago

After the zoom in the system settings is adjusted to 100%, the whole system is quite small, the mouse is difficult to step text, start menu, explorer and the like, it is not easy to operate, this can be a low priority, and when I find out that there is a computer that supports VK driver, I will further test it and report the results to you

---Original--- From: @.> Date: Fri, Mar 1, 2024 04:33 AM To: @.>; Cc: @.**@.>; Subject: Re: [cogentcore/core] default spacing is really too big (Issue #909)

Did you restart the app after you changed the system scaling factor? Do you have a different font size specified in your accessibility settings? Can you send me a screenshot of Inspect > Inspect app > Screens > right click > Edit?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ddkwork commented 4 months ago

Did you restart the app after you changed the system scaling factor? Do you have a different font size specified in your accessibility settings? Can you send me a screenshot of Inspect > Inspect app > Screens > right click > Edit?

is this ?

{4324D9EA-60FE-432c-BBBE-11A2E6D455F3}
kkoreilly commented 4 months ago

Yes. It says that you have a Device pixel ratio of 1.5, which means that it thinks your system has 150% zoom. Can you show me a screenshot of that same page with your system widgets (taskbar, etc) included, with the system zoom and Cogent Core zoom at 100% and the app restarted to show the difference between the system and Cogent Core?

ddkwork commented 4 months ago

2762713521 @.***

 

------------------ 原始邮件 ------------------ 发件人: "cogentcore/core" @.>; 发送时间: 2024年3月1日(星期五) 上午10:47 @.>; @.**@.>; 主题: Re: [cogentcore/core] default spacing is really too big (Issue #909)

Yes. It says that you have a Device pixel ratio of 1.5, which means that it thinks your system has 150% zoom. Can you show me a screenshot of that same page with your system widgets (taskbar, etc) included, with the system zoom and Cogent Core zoom at 100% and the app restarted to show the difference between the system and Cogent Core?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

kkoreilly commented 4 months ago

It says that it is an invalid address.

ddkwork commented 4 months ago

wait me,sorry

ddkwork commented 4 months ago

{14913537-D06F-49b3-8B97-E2D454E38A34}.png

{0A6902E6-3588-4a70-9030-00CC4BB619BD}.png

kkoreilly commented 4 months ago

For me, the Cogent Core file view is only slightly bigger than the Windows one. Can you send a screenshot of the same thing (the Cogent Core file view alongside the Windows one). Also, are you sure your zoom and spacing are set to 100 in the Cogent Core settings?

image

ddkwork commented 4 months ago

{EC9985DF-039C-4fe3-A59F-448A9AF66EB8}.png

ddkwork commented 4 months ago
//this looks like well to me

func Test_well(t *testing.T) {
    zoom, spacing := well(150)
    assert.Equal(t, float64(50), zoom)
    assert.Equal(t, float64(70), spacing)

    zoom, spacing = well(100)
    assert.Equal(t, float64(0), zoom)
    assert.Equal(t, float64(20), spacing)
}

func well(systemScale float64) (zoom, spacing float64) {
    return systemScale - 100, systemScale - 80
}