This question is answered.


Permlink Replies: 11 - Pages: 1 - Last Post: 29 Mar 24, 18:58 Last Post By: ctwist Threads: [ Previous | Next ]
ctwist

Posts: 443
Registered: 27-Sep-2003
Disabled setting can be changed
Posted: 25 Mar 24, 18:16
 
  Click to reply to this thread Reply
I am getting ready to post a new version of Mirage; just doing some final checks.

I am using the "Image bounds / Folders" setting to force a static folder thumbnail size.
hints.jap contains
processFolderThumbs=true
folderThumbSize=82x54
skin.properties contains
disabledControls=processFolderThumbs,folderThumbSize
When I create a project, or switch from Tiger to Mirage, folderThumbSize is correctly set to 82x54, but I can change this setting; if I hover over the selector, a message "Disabled by current skin" is shown, but I am able to change the thumb size.

Do I need to set something else, or is this a jAlbum buglet?
RobM

Posts: 3,926
Registered: 4-Aug-2006
Re: Disabled setting can be changed
Posted: 25 Mar 24, 19:50   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Have you tried adding thumbnailLayoutPanel to the disabledControls list?
ctwist

Posts: 443
Registered: 27-Sep-2003
Re: Disabled setting can be changed
Posted: 25 Mar 24, 19:57   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
No; thumbnailLayoutPanel is in a different area (number of thumbnail columns and rows). This is not relevant.
RobM

Posts: 3,926
Registered: 4-Aug-2006
Re: Disabled setting can be changed
Posted: 25 Mar 24, 20:13   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
The only other thing I can think of is from an old post, https://jalbum.net/forum/message.jspa?messageID=354867#354867
‘When another skin is loaded, the disabled state is reverted and old tool-tips reinstalled.’
But that would only apply to changing skins, not to a new project using the default skin.
JeffTucker

Posts: 8,361
Registered: 31-Jan-2006
Re: Disabled setting can be changed
Posted: 29 Mar 24, 12:05   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
I can confirm that unwanted behavior. David usually checks posts in this forum section, but if you don't hear from him, you might want to post a regular bug report.

That said, I'm always a bit leery of skins that force things like image dimensions on users. Users tend to get very shirty about things like that. ;)
davidekholm

Posts: 3,542
Registered: 18-Oct-2002
Re: Disabled setting can be changed
Posted: 29 Mar 24, 12:37   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I've tried to reproduce this but fail to :-(
Does it only happen if you quickly switch between skins?
JeffTucker

Posts: 8,361
Registered: 31-Jan-2006
Re: Disabled setting can be changed
Posted: 29 Mar 24, 12:48   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Edit the skin.properties file for Atom, and add folderThumbSize to the list of disabled controls. Now do whatever you like, at whatever leisurely pace you desire - relaunch jAlbum and choose Atom, for example. The folder thumbnail bounds can still be accessed by the user.
ctwist

Posts: 443
Registered: 27-Sep-2003
Re: Disabled setting can be changed
Posted: 29 Mar 24, 15:35   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
That said, I'm always a bit leery of skins that force things like image dimensions on users. Users tend to get very shirty about things like that. ;)
Yes I agree in general, but in this instance, the folder icon is a fixed size, and the folder thumbnail must fit inside it.
davidekholm

Posts: 3,542
Registered: 18-Oct-2002
Re: Disabled setting can be changed
Posted: 29 Mar 24, 17:47   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
Ok, I can reproduce it with Atom.
Looking at Atom.java:188
new StateMonitor() {
    public void onChange() {
        window.ui2Engine();
        engine.setProcessFolderThumbs(folderSection.isSelected());
        window.engine2UI();
    }
}.add(folderSection).done();


That's what's causing it. When folderSection is being ticked during a engine2UI call (when skin loads), then your onChange is triggered which sets processFolderThumbs. jAlbum in turn has another rule that enables the folderThumbSize UI control whenever processFolderThumbs is ticked.

Do you really wish to have a situation where processFolderThumbs is ticked without folderThumbSize is being enabled?
JeffTucker

Posts: 8,361
Registered: 31-Jan-2006
Re: Disabled setting can be changed
Posted: 29 Mar 24, 17:49   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Do you really wish to have a situation where processFolderThumbs is ticked without folderThumbSize is being enabled?

Not in my skins. This is purely a ctwist issue, so I'll let him take it from here.
davidekholm

Posts: 3,542
Registered: 18-Oct-2002
Re: Disabled setting can be changed
Posted: 29 Mar 24, 18:48   in response to: JeffTucker in response to: JeffTucker
Correct
  Click to reply to this thread Reply
Well, one naturally expects the disabledControls skin property to be respected so I've fixed this now by checking whether anyone "vetoes" a setEnabled call. This new veto mechanism for components is now respected by ComponentUtilities and StateMonitor.

(Tech details: You can add a veto to a component's setEnabled call by calling ComponentUtilities.addEnabledVeto(comp, veto) where "comp" is the component to add a veto to and "veto" is any object that represents the veto. Later on, you can remove the veto by calling ComponentUtilities.removeEnabledVeto(comp, veto). When a skin specifies components to be disabled, then I add a veto to each such component)

All in v34.2.3 (core update)
ctwist

Posts: 443
Registered: 27-Sep-2003
Re: Disabled setting can be changed
Posted: 29 Mar 24, 18:58   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment folder thumbs.png (44.9 KB)
davidekholm wrote:
Do you really wish to have a situation where processFolderThumbs is ticked without folderThumbSize is being enabled?
See attached.
The folder icon is a fixed size. Folder thumbnails must fit inside the icon.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums