IDE Scale issues
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
IDE Scale issues
Hi Livecoders,
Just a quick question on a pet peeve I have had with the IDE. Do you know how I can overcome the fact that when I scale an app down when I close it and open the app it goes off screen and I need to use the inspector to relocate the stack to within my screen? This only happens on scaled stacks. Is there any solution to this issue? The same for any app prompts as they happen off-screen and are very annoying to deal with. Many thanks
While I am at it is there an option to have the project browser stay on top of the IDE? Can be quite annoying searching for it sometimes. (Maybe should do this under another thread to help someone else out)
Many thanks
Just a quick question on a pet peeve I have had with the IDE. Do you know how I can overcome the fact that when I scale an app down when I close it and open the app it goes off screen and I need to use the inspector to relocate the stack to within my screen? This only happens on scaled stacks. Is there any solution to this issue? The same for any app prompts as they happen off-screen and are very annoying to deal with. Many thanks
While I am at it is there an option to have the project browser stay on top of the IDE? Can be quite annoying searching for it sometimes. (Maybe should do this under another thread to help someone else out)
Many thanks
Re: IDE Scale issues
These and other issues are old. LC is re-writing the IDE with next version, I guess we have to be patient….
Re: IDE Scale issues
Hi istech,
new IDE or not, this sounds like a bug and therefore needs to be reported!
Sounds like the IDE is mixing the "scaled loc" with the "unscaled loc" of your stack(s).
Or maybe just set its style to PALETTE:
This needs to be done with the M"essage Box" or a little plug-in.
Best
Klaus
new IDE or not, this sounds like a bug and therefore needs to be reported!
Sounds like the IDE is mixing the "scaled loc" with the "unscaled loc" of your stack(s).
You could try to:While I am at it is there an option to have the project browser stay on top of the IDE? Can be quite annoying searching for it sometimes.
Code: Select all
set the systemwindow of stack "revIDEProjectBrowser" to TRUE
Code: Select all
palette "revIDEProjectBrowser"
Best
Klaus
Re: IDE Scale issues
Hi Klaus,
Thanks for this. I wonder when a simple option like this can be added to the project browser settings. The "system window" option seems to work best for my needs.
Hopefully, the next version of the IDE has some really intuitive features. Not played with LC 10 as yet, maybe I should give it a go.
Thanks for this. I wonder when a simple option like this can be added to the project browser settings. The "system window" option seems to work best for my needs.
Hopefully, the next version of the IDE has some really intuitive features. Not played with LC 10 as yet, maybe I should give it a go.
Re: IDE Scale issues
Personally I manage the window scaling and position in a preferences file.
Not in the least because I have many users that will use the app on a number of different computers that can have vastly different resolutions (and annoyingly, given that these are windows machines, magnifications as well - so for the same resolution there can still be a huge difference in, well, resolution as sometimes machines are set to magnify to 150%... sigh).
I include controls in the app to scale the interface up or down (or reset to default) and every time that happens a preferences file (just a text file) is updated on a local machine directory. The file structure is pretty simple, it's just key-value pairs separated with a ":", and include scaling and stack location, which are set on change and on quit and read/restored on startup.
That way I don't have to worry about these things, they are set to whatever the user sets them to and restored on startup.
HTH
Stam
Not in the least because I have many users that will use the app on a number of different computers that can have vastly different resolutions (and annoyingly, given that these are windows machines, magnifications as well - so for the same resolution there can still be a huge difference in, well, resolution as sometimes machines are set to magnify to 150%... sigh).
I include controls in the app to scale the interface up or down (or reset to default) and every time that happens a preferences file (just a text file) is updated on a local machine directory. The file structure is pretty simple, it's just key-value pairs separated with a ":", and include scaling and stack location, which are set on change and on quit and read/restored on startup.
That way I don't have to worry about these things, they are set to whatever the user sets them to and restored on startup.
HTH
Stam
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: IDE Scale issues
AI bot. First post 1 minute after joining, generic info, and there has never been a "Use default location" option in the stack's property inspector. Even if there was, you can't access the property inspector before opening the stack.
Edit : I see the mods agree, the post has disappeared.
Edit : I see the mods agree, the post has disappeared.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: IDE Scale issues
Hello Stam,
Do you happen to have a sample stack on how you resize and use your preferences file? I think that could be very helpful for me.
thanks.
Do you happen to have a sample stack on how you resize and use your preferences file? I think that could be very helpful for me.
thanks.
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: IDE Scale issues
My gifted 2015 iMac is blowing my screenshots up in a very odd way . . . the Retina display, I suppose: not that convenient.
Re: IDE Scale issues
Thank you Stam.
Re: IDE Scale issues
Hi Lance,
I've attached a cut-down version focusing on scaling and location of stack. In this example, it creates a text file in the specialFolderPath("support") folder.
Almost all code is in the stack script:
Code: Select all
global gSettings
constant kMinScale = 0.8
constant kMaxScale = 1.5
/* SETTINGS TEXT FILE ORDER BY LINE:
scaleFactor:<the numerical value>
stackLocation:<the coordinates for the centre point of the stack>
*/
command loadSettings
put URL ("file:" & specialFolderPath("support") & slash & "TESTAPP settings.txt") into gSettings
if gSettings is empty then exit loadSettings
set the itemDelimiter to ":"
set the scaleFactor of this stack to item 2 of line 1 of gSettings
set the loc of this stack to item 2 of line 2 of gSettings
end loadSettings
command saveSettings
local tPath
put "ScaleFactor" & ":" & the scaleFactor of this stack into line 1 of gSettings
put "stackLocation" & ":" & the loc of this stack into line 2 of gSettings
put specialFolderPath("support") & slash & "TESTAPP settings.txt" into tPath
put gSettings into URL ("File:" & tPath)
end saveSettings
command doScale pDirection, pID
-- increments or decrements scaling by 0.05 unless hits the limits in set by the constants above
-- pID is the long ID of the caller, to dispatch a callback.
switch pDirection
case "shrink"
if the scaleFactor of this stack >= kMinScale then
set the scaleFactor of this stack to the scaleFactor of this stack - 0.05
end if
break
case "default"
set the scaleFactor of this stack to 1
break
case "magnify"
if the scaleFactor of this stack <= kMaxScale then
set the scaleFactor of this stack to the scaleFactor of this stack + 0.05
end if
break
default
-- do nothing if empty
end switch
#send callback to buttonBar to disable shrink or magnify buttons if at limits (set in constants above)
dispatch "disableEdgeButtons" to pID with kMinScale, kMaxScale
# update gSettings and write to file
saveSettings
end doScale
on moveStack
# detect stack movement and update prefs file
saveSettings
end moveStack
There is some minor code in the buttonBar to grey out buttons if they hit the preset limits, which are defined as constants in the stack script.
Let me know if something doesn't make sense (I tested it briefly as it's always error prone copying code across to other projects, it seemed to work exactly as expected).
HTH
Stam
------- EDITED --------
Code slightly simplified/refactored (it's never pretty looking at old code ). Also added correct build settings, as this only really shows in a built app (the IDE saves position/scaling, but not the standalone, I don't think anyway!). To test this in action, just build standalone for your platform and it should work...
- Attachments
-
- stackResizeWithPrefs.livecode.zip
- (3.31 KiB) Downloaded 65 times
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: IDE Scale issues
Phew: turned off the retina display thing (after 2 weeks!), and I hope my screenshots won't blow up out of control when posted in forums.
Of course no-one can expect customers to turn off this sort of thing.
Of course no-one can expect customers to turn off this sort of thing.
Re: IDE Scale issues
Not sure what question you’re answering, but you do know you can adjust size and resolution in Preview.app right?richmond62 wrote: ↑Thu Sep 21, 2023 10:06 amPhew: turned off the retina display thing (after 2 weeks!), and I hope my screenshots won't blow up out of control when posted in forums.
Of course no-one can expect customers to turn off this sort of thing.
And that you can open a screenshot directly in Preview before the file is even created?
Surely that’s the thing to do rather than lowering your screen’s resolution?
In any case, it is usually essential to open screenshots in Preview to export as JPG and adjust the JPG compression so the file size is < 200Kb, or you won’t be able to load. But part of that is shrinking the image before exporting to JPG, so that you don’t have to compress as much…
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: IDE Scale issues
1. About Preview: Yes, I have been using that for that since about 2002.
2. I turned off Retina because it was playing "silly buggers' in many respects: personally, things now seem to have stabilised.
3. I am not sure if I am answering any questions: but I might be raising one about scaling that refers to desktop computers.
2. I turned off Retina because it was playing "silly buggers' in many respects: personally, things now seem to have stabilised.
3. I am not sure if I am answering any questions: but I might be raising one about scaling that refers to desktop computers.