MozillaZine

[ext/dev] SeaTab-X-2 - Firefox tab closers in SeaMonkey

Announce and Discuss the Latest Theme and Extension Releases.
patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 15th, 2014, 5:08 pm

My other extension SeaFox does that as well as many other modifications that makes SeaMonkey closer to 3.x-era Firefox:
https://addons.mozilla.org/en-US/seamon ... n/sea-fox/
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

igor_ubuntu
 
Posts: 9
Joined: December 15th, 2014, 4:50 am

Post Posted December 16th, 2014, 4:29 am

patrickjdempsey wrote:My other extension SeaFox does that as well as many other modifications that makes SeaMonkey closer to 3.x-era Firefox:
https://addons.mozilla.org/en-US/seamon ... n/sea-fox/

Thank you, patrickjdempsey. It works. But the height of tabs rather strongly has increased. Is it possible to reduce the height of the tabs?
I would like to reduce the height of the tabs.

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 16th, 2014, 4:36 am

It all depends on what theme you are using. In the default theme the height of the tabs vary quite a bit in different OS's because of the heights put on buttons etc. Since I don't use Linux I really wouldn't know what it making the tabs taller there. For instance in Windows, the tabs actually get shorter in the default theme with SeaFox enabled.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted December 16th, 2014, 4:41 am

Also, if you'd like to continue to discuss SeaFox Support issues, please comment in the following thread as this one is for SeaTabX2:
viewtopic.php?f=48&t=2836799
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

barbaz
 
Posts: 1680
Joined: October 1st, 2014, 3:25 pm

Post Posted January 18th, 2015, 9:45 pm

Nice addon, thanks patrickjdempsey!
With SeaMonkey on Mac OS X, using the default theme, after setting browser.tabs.closeButtons to 1 and installing SeaTabX-2, the 'List all tabs' button seemed awkwardly positioned and the tab close buttons seemed to extend into some added blank space to their right, making the tab bar look funny. (These things don't happen in same version of SeaMonkey on Linux with oxygen-molecule system theme. Can't check Windows, sorry.)

Also, I'd like to make an RFE: when browser.tabs.closeButtons is set to 1, could you please not hide the close button on the tab when only one tab is open?

In case it saves you some time, here's the Stylish user style I came up with to address those two things:
Code: Select all
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

@-moz-document url("chrome://navigator/content/navigator.xul") {

/* SeaTab-X-2 hides the builtin tab close button, putting the 'list all tabs'
 * button too close to the window edge .......*/
[anonid="alltabs-button"] {
  padding-right: 5px;
}

/* Get rid of the awkward blank space to the right of the tab close button .....*/
.tab-close-button > *:not(.toolbarbutton-icon) {
  display: none !important;
}

/* show close button when only one tab is open.......*/
#content[browsertabsclosebuttons="1"] .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button {
  opacity: 0.85 !important;
}

}

The fixes for the OS X issues I described don't seem to have any effect in my Linux test system.
*Always* check the changelogs BEFORE updating that important software!

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 19th, 2015, 10:03 am

barbaz wrote:Nice addon, thanks patrickjdempsey!
With SeaMonkey on Mac OS X, using the default theme, after setting browser.tabs.closeButtons to 1 and installing SeaTabX-2, the 'List all tabs' button seemed awkwardly positioned and the tab close buttons seemed to extend into some added blank space to their right, making the tab bar look funny. (These things don't happen in same version of SeaMonkey on Linux with oxygen-molecule system theme. Can't check Windows, sorry.)


Thanks, I'll look into adding your code.

barbaz wrote:Also, I'd like to make an RFE: when browser.tabs.closeButtons is set to 1, could you please not hide the close button on the tab when only one tab is open?


It's only hidden for aesthetics. If you put the mouse cursor on the tab, the closer should reappear.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

barbaz
 
Posts: 1680
Joined: October 1st, 2014, 3:25 pm

Post Posted January 19th, 2015, 11:25 am

patrickjdempsey wrote:Thanks, I'll look into adding your code.

You're welcome.

patrickjdempsey wrote:It's only hidden for aesthetics. If you put the mouse cursor on the tab, the closer should reappear.

I know. The point is I personally prefer the look of the tab with the closer visible rather than with the empty space to the right, and SeaTab-X-2 currently treats browser.tabs.closeButtons=3 ("default" as far as SeaTab-X-2 is concerned) the same as if that pref is set to 1 ("always show close buttons on all tabs"), so could setting the pref to 1 please have this visual effect?
*Always* check the changelogs BEFORE updating that important software!

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 20th, 2015, 2:03 pm

I'm actually just copying the behavior from Firefox (at least on Windows I've never used it on OSX). The difference being that in Firefox, the closer was completely hidden for a single tab and I'm allowing it to be visible on hover.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

barbaz
 
Posts: 1680
Joined: October 1st, 2014, 3:25 pm

Post Posted January 20th, 2015, 11:00 pm

patrickjdempsey wrote:I'm actually just copying the behavior from Firefox (at least on Windows I've never used it on OSX).

It's like that on OS X too. Or, at least it was with Fx 18.0.2 - I've never wanted to even try any newer versions of Firefox than that on my primary system.

patrickjdempsey wrote:The difference being that in Firefox, the closer was completely hidden for a single tab and I'm allowing it to be visible on hover.

That's not quite all. The other differences from Firefox (v 18.0.2) are:
1) in Firefox, you *can't* close the last active tab without closing the window; whereas in SeaMonkey you can close the last active tab and you're left with a blank tab
2) in Firefox, when you have only one tab open the tab title text extends into the space where the closer would be; in SeaMonkey with SeaTab-X-2 you just have a blank space where the closer would be.

You've already addressed #1 by making sure to keep the closer (though not visible without hover); it's #2 which drives the RFE. I don't know how hard it would be to extend the tab title text into the closer area when the mouse isn't hovered over the tab (well, I didn't until in the middle of writing this post - see below), and I quite frequently close a single active tab in a window, so showing the closer all the time works well here (and having it available in the first place when there is just a single tab in the window is much appreciated :) ).

Oh, and while writing this post, I thought of this CSS to extend the tab title text into the closer area when there's only one tab in a window:
Code: Select all
.tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button:not(:hover),
.tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button:not(:hover) * {
  display: none !important;
}

This would eliminate the aesthetic need for the RFE and really make it look more like Firefox style tab.
Note that without the second selector line, you apparently get 'flickering' of the closer when the mouse is moving over the region the closer should appear in...

Hope that helps.
*Always* check the changelogs BEFORE updating that important software!

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 21st, 2015, 1:51 am

display:none won't work because the closer modifies the height of the tabs in most themes. So then the tab height jumps. Maybe:

Code: Select all
/* hide close button on single tab, but show when hovered */
#content:not([browsertabsclosebuttons="2"])
  .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button *,
#content:not([browsertabsclosebuttons="2"])
  .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button {
  opacity: 0;
  width:0px ;
  padding:0px!important;
}


Personally, I prefer it not "jumping" but whatever.

Edit: your number 1 is actually a configurable preference: browser.tabs.closeWindowWithLastTab
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

barbaz
 
Posts: 1680
Joined: October 1st, 2014, 3:25 pm

Post Posted January 21st, 2015, 10:37 am

patrickjdempsey wrote:display:none won't work because the closer modifies the height of the tabs in most themes. So then the tab height jumps.

I tried to find such a theme for Linux without success. Any suggestions?

patrickjdempsey wrote:Maybe:

Code: Select all
/* hide close button on single tab, but show when hovered */
#content:not([browsertabsclosebuttons="2"])
  .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button *,
#content:not([browsertabsclosebuttons="2"])
  .tabbrowser-tab:first-of-type:last-of-type:not(:hover) .tab-close-button {
  opacity: 0;
  width:0px ;
  padding:0px!important;
}

Unfortunately that still leaves some extra space. Replacing "padding:0px!important" with
Code: Select all
  margin-right:0px !important;
  margin-left:0px !important;

seems to work though. Does that still avoid the tab height jumping (which I too wouldn't like)?

Also, you'll need to replace .tab-close-button with .tab-close-button:not(:hover) everywhere in that CSS snippet to avoid close button flickering on mouseover+mousemove in Mac OS X.

patrickjdempsey wrote:Edit: your number 1 is actually a configurable preference: browser.tabs.closeWindowWithLastTab

Cool, thanks for the info!
*Always* check the changelogs BEFORE updating that important software!

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted January 21st, 2015, 12:00 pm

barbaz wrote:Also, you'll need to replace .tab-close-button with .tab-close-button:not(:hover) everywhere in that CSS snippet to avoid close button flickering on mouseover+mousemove in Mac OS X.


Yeah, I'm not trying to add that code, it's too "busy" IMO. Simple is always better.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

barbaz
 
Posts: 1680
Joined: October 1st, 2014, 3:25 pm

Post Posted January 21st, 2015, 12:27 pm

Fair enough, thanks for considering
*Always* check the changelogs BEFORE updating that important software!

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted February 9th, 2015, 9:38 pm

barbaz wrote:
Code: Select all
/* Get rid of the awkward blank space to the right of the tab close button .....*/
.tab-close-button > *:not(.toolbarbutton-icon) {
  display: none !important;
}



Just a wild guess here, but this reminds me of a problem I've seen in the past with OSX and Linux... for some reason on those platforms empty labels are often given width even though they are empty. Since all buttons and toolbar buttons automatically get a label, this can cause weird alignment issues. Removing the labels (which are never needed for these buttons) should do the trick:

Code: Select all
.tabbrowser-tab .tab-close-button label {
  display:none;
}


I'm including this as well as a fix for the all-tabs button width (which I fixed in SeaFox some time ago). I'll also try to get SeaTabX2 on the path to Public status on the next update.
Last edited by patrickjdempsey on February 10th, 2015, 12:19 am, edited 1 time in total.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted February 10th, 2015, 12:19 am

Now Public folks! SeaTabX2 Should now appear in searches on AMO!
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests