INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Feature Request: Add (or modify) skinnable lock state icon for use within tabs  (Read 1635 times)

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 828

Request: a new Standard View icon SplitViewTab_Lock.png

Description:  A skinnable Lock icon with parameters available in the skin main.xml to position it horizontally within the tab, relative to the tab's first text character.

States:  icon visible = tab locked | icon hidden = tab unlocked.

Display:  Appears underneath the tab text layer.  Height of the icon within the tab must accommodate an underbar image below the tab's text alphas.
Note:  This height range is currently available for the Close "x" icon, ...Skins\Standard View\Black on Black\SplitViewTab_Close.png.

AFIK, the independent positioning (i.e. no entanglement with Close "x" icon) and height range are not available for the existing small Lock icon found in .../Data/Custom Art/SmallIcons.png

Caveat:  Application of this new icon to reduce overall tab width requires that SmallIcons.png Lock can be set to not consume any space inside a tab.  This would be possible with independent positioning control of SmallIcons.png Lock and the Close "x" icon.  Otherwise remove Smallicons.png Lock display altogether from the tab environment, replacing it with this new icon and give SplitViewTab_Close its own positioning parameter relative to end of text.

Reference:  Feature Request 2 in https://yabb.jriver.com/interact/index.php/topic,135855.msg941119.html#msg941119

Win 10/11 Pro (64-bit)  MC 30.0.25
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 828

Another thought:  Add two new states to SplitViewTab_Buttons.png (in addition to the current Normal, Selected, Over, Disabled):

Normal (Locked)
Selected (Locked)

Advantage: The goal is to extend tab skinning without altering any of the existing functionality and not breaking any existing skins.  I assume it could be made backwards compatible by image layering and per value of "Number of Images<=4" or "Number of Images=6". 

Applications:
-- Color or shade locked and unlocked tabs differently, with the option of not using a lock icon at all. 
-- Easily place any kind of lock icon anywhere in the tab, relative to its borders.
-- Selected (Locked) example:  See attachment for a Locked (under dot) and Selected (under bar) tab.  The associated logic cannot be fully implemented in MC 30.0.29 but should be possible with the requested two new tab states.

Note:  As usual, the new states must accept MC's Matrix Drawing entries Rows and Columns, including Flex variants, to control the drawing of line art as the tab width varies.

7/5/2023 Added sample attachment.
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

Here is another approach a rival Media player uses regarding locked tabs: it has no lock icon of any kind... ever... so no wasted space.  It works is like this:
   - To close unlocked tabs: MMB just like MC, or RMB the tab and choose "close tab" from the menu (fyi... this player does not use tab close buttons at all- MMB to close is essentially standard)
   - To close locked tabs: MMB is ignored - no warning, no info dialog pop-up... nothing.  You must RMB and select close tab from the menu to close locked tabs, which protects against accidental tab closure. You can also unlock the tab first and then close via MMB. 

After one closes or attempts to close locked and unlocked tabs a few times, the process becomes straightforward - and no need to allocate space to the side or below the tab text, or need to create new lock icons.  Your suggestion to underline Tab text to indicate "locked" does not use any extra horizontal space, but underlined text means "link" to most users (e.g., all the underlined text links on the right side of the tabbar, which are links).

We both agree that minimizing the amount of space tabs take up is important, but maybe not on the best approach for how to do it.  Since Matt recently created a new option to hide or show the tab close buttons, perhaps he could do the same with the tab lock icons?  That is, if a user chooses to hide the tab lock icon, MMB on a locked tab produces the same warning we get right now "The tab is locked.  Are you sure you want to close this tab?". If the tab is unlocked, then MMB simply closes the tab.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 828

Yes, another approach which some may like.  Interesting idea to turn lock icons off and on, but it must be done in a way that saves space of course.   My current preference is described in Reply #1 which gives a lot of flexibility.  I prefer the immediate feedback of seeing visually which tabs are locked.

I now use a thin, dim, nearly tab-wide underline to indicate the selected tab, somewhat like what is done in MO 4Media, but less glaring and I don't change tab background color.  It is a stretch to confuse that moveable graphic line inside a tab with a "link".  Adding a small lock dot at one end of the line is the appearance I currently want to try, but it is impossible today.  Also in practice I don't sense any confusion with the notion of "keyboard shortcut", which seems to be less used in today's GUIs than in the past anyway. 




Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

Interesting idea to turn lock icons off and on, but it must be done in a way that saves space of course. 
Since Matt reduced space when hiding the tab close buttons, I'm sure he could achieve the same for hiding the tab lock icons.

I prefer the immediate feedback of seeing visually which tabs are locked.
To be clear, I also prefer to show something over nothing - I described how another media player handled locked/unlocked tabs to hopefully inspire more ideas.

It is a stretch to confuse that moveable graphic line inside a tab with a "link". 
Okay… You're not wrong… I was stretching things a bit because I really dislike an underline as a potential lock indicator :(

The space allocated on either side of the tab text for the lock indicator and tab close button is different, as you can see in the attached pic. The lock icon space is ~50% wider than the space around the tab close button.  If our benevolent MC overlord could somehow make a lock indicator dot closer the tab text and reduce the excess space, that would be the ideal solution for me personally.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 828

If our benevolent MC overlord could somehow make a lock indicator dot closer the tab text and reduce the excess space, that would be the ideal solution for me personally.
You should be able to skin that today (I last tested it back on 3.0.25):
https://yabb.jriver.com/interact/index.php/topic,135855.msg944695.html#msg944695

Another thought:  Since most of my tabs are locked all the time, use no icon for a locked tab, and a simple icon (maybe just a dot, or a small broken open circle, gentle warning) for indicating an unlocked tab.  Again, I would prefer to implement per Reply #1 for flexible location.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9143

Another thought:  Since most of my tabs are locked all the time, use no icon for a locked tab, and a simple icon (maybe just a dot, or a small broken open circle, gentle warning) for indicating an unlocked tab.  Again, I would prefer to implement per Reply #1 for flexible location.
Seriously, please, do not do that. Thanks :)

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

You should be able to skin that today (I last tested it back on 3.0.25):
https://yabb.jriver.com/interact/index.php/topic,135855.msg944695.html#msg944695
Obviously it can be skinned today - that is how I created the dot next to the tab text to begin with.  I can tweak tab-text/tab-icon spacing via the skin XML file, but I cannot squeeze the excess space around the dot itself (due to the fixed "envelope" around the lock sub-image).

The lock icon space is ~50% wider than the space around the tab close button.  If our benevolent MC overlord could somehow make a lock indicator dot closer to the tab text and reduce the excess space
This is where Matt comes in - create a way to remove that excess space (if possible).

Seriously, please, do not do that. Thanks :)
Agreed
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

You might try editing InternalMarginLeft and InternalMarginRight in the skin to adjust the sizing.
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

You might try editing InternalMarginLeft and InternalMarginRight in the skin to adjust the sizing.
I am very familiar with the split view tab settings and have fiddled with them an impressive amount the last couple of years ;D.  The problem is finding combinations of SplitTabView values that looks good for all 4 tab configurations: Unlocked tab show close button, Unlocked tab hide close button, Locked tab show close button, Locked tab hide close button.

If I narrow the margins to reduce the excess space around the lock icon (which I have customized as a "dot") then unlocked tabs looked terrible because the text/tab border are now too close.  If I increase margins for a pleasing amount of space around the tab text, that results in excessive space around the tab lock icon (which brings us full circle).

And as I've noted in an couple of posts above, the fixed space around the lock icon is 50% wider than the fixed space around the tab close button.  Presumably that is related to the tab lock icon being a sub-image in the small icons image file (used by all skins), whereas the tab close button is a dedicated skin specific image.  If the lock icon and tab close button image "envelopes" were identical, it might be possible to adjust the margins and image offsets to get what I am after (but I'm not positive... it still may not work).

Can you do that? Does that make sense? Hopefully all that didn't just muddy the waters further.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

The lock icon looks pretty good to me with the default skin.

Here's the layout code:
int nImageToTextSpacing = (int) GetJRSkinning()->GetSkinInfoInt(m_strSkinItemWindow, _T("ImageToTextSpacing"), 6, true, true, true);
int nLockSize = Layout.GetHeight(0.5);
rectLock = Layout.LayoutLeft(JRSize(nLockSize, nLockSize), nImageToTextSpacing, true);
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

Well I am not a coder, Matt, you know that!  I can maybe… sort of… decipher some of it, but only enough to be dangerous and suggest something foolish for you to try.  But hey, that's right my wheelhouse!

I am guessing the 6 in ("ImageToTextSpacing"), 6, true, true, true) represents the margin to the left of tab text?  If so, what do things look like if you change that to 1 or 2?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

It only uses 6 if it doesn't find ImageToTextSpacing in the skin.  So maybe try setting that.
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

I always set ImageToTextSpacing to 4 for all my skins. Sometimes 3 looks okay without being too tight, but larger numbers spread things out too much.  Bottom line, I always have a value set for that input, so it is not defaulting to 6
Logged

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

In the attached picture, look at the highlighted portions around the lock icon and close button - you can see the distance from the text to the adjacent tab border is approximately 50% wider for the lock icon.

It's not that it looks bad, but it would definitely look better if the space around each icon were identical.  And just as importantly, it buys back precious tabbar real estate.  It may not look like much, but when you have 6 to 10 tabs open, that small reduction makes a big difference.

NOTE: I am showing the tab close buttons even though I don't personally use them.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

The distance from the left edge to the lock is the combination of these two:
FirstItemTextOffset
InternalMarginLeft
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

The distance from the left edge to the lock is the combination of these two:
FirstItemTextOffset
InternalMarginLeft
Well yes, but... just as the variable name suggests, it is only for the 1st "item", which in practice means it only applies to the 1st tab. 

See the attached picture: For both tab layouts, the left/right internal margins are 9.
  Tab row Top layout          FirstItemTextOffset =-9
  Tab row Bottom layout    FirstItemTextOffset = 0

This clearly validates my statement above (that setting only applies to the 1st tab).  It is because of this behavior that I use FirstItemTextOffset=0 for all my skins, otherwise the 1st tab does not match the rest of them.  The green highlighting in this posts picture is meant to show how much relative excess space there is around the lock icon when there is no tab close button.  It is that left side excess space I would love to see shrunk, but without compromising the space around the tab text for Unlocked tabs with or without close buttons.

Like I said, it is very difficult to come up with a combination of SplitTabView settings that works for all tab/icon combinations.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

For tabs other than the first tab, it uses OverlapRight plus InternalMarginLeft.
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

For tabs other than the first tab, it uses OverlapRight plus InternalMarginLeft.
Yes… But then gaps between tabs become too large (for my personal taste anyway).  We can go round and round on this all day, but trust me when I tell you that I have fiddled with these settings endlessly, and there is no combination that achieves the look I want. >:(

I am throwing in the towel on this one.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!

Yes… But then gaps between tabs become too large (for my personal taste anyway).  We can go round and round on this all day, but trust me when I tell you that I have fiddled with these settings endlessly, and there is no combination that achieves the look I want. >:(

I am throwing in the towel on this one.

I'm just saying how it works.  If you have a proposal, we're happy to listen.  Thanks.
Logged
Matt Ashland, JRiver Media Center

HPBEME

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1108
  • Goodnight and Good Luck

I'm just saying how it works.  If you have a proposal, we're happy to listen.  Thanks.
I appreciate that Matt.

My prior post statement of "...there is no combination that achieves look I want" can easily be misconstrued.  I actually like very much the way I have the Tabs configured for both appearance and spacing - only the extra space around the lock icon is bothersome. That said, I am guessing that as long as the lock icon is a sub-image within MC's small icon image (attached pic shows a small portion with my custom dot), the extra space around it can never be eliminated without compromising the overall look of the tab.

What I am throwing the towel in on is trying trying to save extra tab bar space via changes to the lock icon. If it were super easy, great, but I think this is far more effort for you guys than it is worth.  I have other ideas completely unrelated to the lock icon and/or tabs.  When I have some time, I will put something together on that.
Logged

markf2748

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 828

For the record demonstration, as previously mentioned elsewhere:  I reduce the "extra space" in the left margin of my tab to near zero by offsetting the lock icon dot image used in .../Data/Custom Art/SmallIcons.png (moved the dot horizontally to the left edge against its transparent field).  I can then position the icon close to the tab text, even behind it, while maintaining near zero left margin.  See attached images.

Custom settings in main.xml (modified Black on Black skin) for a small offset dot:
Code: [Select]
...
<SPLITVIEWTAB>
    <Data InternalMarginLeft="8" InternalMarginRight="8" OverlapLeft="-4" OverlapRight="-4" ImageToTextSpacing="-8" FirstItemTextOffset="0" MakeFinalItemSameWidth="1" />
...
Similar space-saving tweaks work for me with a larger dot icon, again offset to left edge.
The close button icon, if desired, can be offset to its right side edge to minimize interference with the down arrow of a selected tab (unfortunately the close button icon is constrained by position entanglement with the lock icon).

Personally, I still really want to move this secondary indicator (tab lock) off the primary "tab label line" altogether. That would save a little more space but also hopefully attract even less attention to itself in my preferred minimalist style, as described in OP or likely even better Reply #1.  I leave it to JRiver to determine how much work it would be to provide the benefit of a general skinning solution for the tab lock icon (I expect it's doable using MC's well-proven skinning technology).

Variation 7/20/2023:  Placed small blue lock dot in the lower left corner of its field, which displays even with bottom of the tab label line text (attached).  Helps some, but not ideal. (Note:  "button" in my filenames is a misnomer, it's a Lock "icon".)

Win 11 Pro 64-bit   MC 31.0.36
Logged
Pages: [1]   Go Up