Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default column width change #87

Closed
wants to merge 1 commit into from
Closed

Default column width change #87

wants to merge 1 commit into from

Conversation

NotGovernor
Copy link

I played around with it until I found some default values that look decent; but I dont know if you want to do it this way. I'll submit it just in case you do. No worries if you want to reject it.

(sorry for the messy PR earlier)

@NotGovernor NotGovernor mentioned this pull request May 31, 2023
@secure-77
Copy link
Owner

Thx for the PR, but the values doesn't fit for WQHD (it looks to small then)

I would suggest to implement something like the following:

if no value is stored in the local storage (this means the user doesn't have already adjust the panel size by himself) we set the value of the panels to one sixth of the window via perlite.js

  // panel sizes
  if (localStorage.getItem('leftSizePanel')) {
    $('.workspace-split.mod-horizontal.mod-left-split').css("width", localStorage.getItem('leftSizePanel'))
  } else {
    $('.workspace-split.mod-horizontal.mod-left-split').css("width", window.innerWidth / 6)
  }

  if (localStorage.getItem('rightSizePanel')) {
    $('.workspace-split.mod-horizontal.mod-right-split').css("width", localStorage.getItem('rightSizePanel'))
  } else {
    $('.workspace-split.mod-horizontal.mod-right-split').css("width", window.innerWidth / 6)
  };

this should then fit for WQHD, Full HD and even non HD screens.

@secure-77 secure-77 closed this May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants