PDA

View Full Version : Need help with customizing the tabs on Google Chrome



Nimbi
June 11th, 2016, 09:40 PM
Hello,

I would like to change the appearance of the tabs in google chrome. Simply put, I want to make them more rectangular instead of having the angled sides. Also, I wish to shorten them a small bit so they don't overlap the title bar. I'm trying to get them changed so they will look better when using custom themes [like firefox does but in Google Chrome and without having to lose the min/max/close buttons]. I currently have Stylish installed as well. If it's possible, can someone please help me with this [I mentioned Stylish in case it would be needed for the changes to be done]. Here's a screenshot for reference.




73966


I'm hoping this is possible to have done.

Shemhamforash
June 11th, 2016, 09:49 PM
Darkwater409 (http://virtualcustoms.net/member.php/280551-Darkwater409) it can't be done without compiling from source and modifying the code.

"One of the cons of Google Chrome is that you cannot change the User Interface, unlike Firefox you can do that easily. That con is one of the strengths as well.

If you are a developer and would like to compile Chromium and remove the curvy tabs into squared tabs, you can do that easily by modifying tab. Chrome has a custom UI Framework that they call Views which is built specifically for Chrome.

The source code where you can modify the look and feel of tabs would originate here Index of /trunk/src/chrome/browser/ui/views/tabs (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/views/tabs/) more specifically the paint methods in this file View of /trunk/src/chrome/browser/ui/views/tabs/tab.h (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/views/tabs/tab.h?view=markup) If you look at its implementation, everything is hand drawn using Skia (2D Graphics API for C++)

That file is well documented (all of Chromium is well documented), and you can draw your tab any way you want, just make sure you update the hit targets as well as its parent container if you plan to resize everything."

Source: https://www.quora.com/How-can-you-change-the-shape-of-the-tabs-in-Chrome-to-rectangular-tabs

Nimbi
June 11th, 2016, 10:39 PM
Darkwater409 (http://virtualcustoms.net/member.php/280551-Darkwater409) it can't be done without compiling from source and modifying the code.

"One of the cons of Google Chrome is that you cannot change the User Interface, unlike Firefox you can do that easily. That con is one of the strengths as well.

If you are a developer and would like to compile Chromium and remove the curvy tabs into squared tabs, you can do that easily by modifying tab. Chrome has a custom UI Framework that they call Views which is built specifically for Chrome.

The source code where you can modify the look and feel of tabs would originate here Index of /trunk/src/chrome/browser/ui/views/tabs (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/views/tabs/) more specifically the paint methods in this file View of /trunk/src/chrome/browser/ui/views/tabs/tab.h (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/views/tabs/tab.h?view=markup) If you look at its implementation, everything is hand drawn using Skia (2D Graphics API for C++)

That file is well documented (all of Chromium is well documented), and you can draw your tab any way you want, just make sure you update the hit targets as well as its parent container if you plan to resize everything."

Source: https://www.quora.com/How-can-you-change-the-shape-of-the-tabs-in-Chrome-to-rectangular-tabs


:icon_eek: That's too much coding for my brain to handle. I may need someone to make the edit for me if it's possible. To be honest I thought it would be possible to do with Stylish, so I didn't realise just how much coding skills would be needed. There's no way in hell I'll be able to figure this out lol. [i have an oxygen deficiency in the part of my brain that deals with focus and it makes it pretty much impossible to focus well enough to read and figure out all that codinglol].

Shemhamforash
June 11th, 2016, 10:48 PM
I'm not saying it would be easy, don't think I could do it myself. Your best bet is probably to find a chrome theme that you find visually appealing to try and match your current theme.

Nimbi
June 11th, 2016, 11:00 PM
I'm not saying it would be easy, don't think I could do it myself. Your best bet is probably to find a chrome theme that you find visually appealing to try and match your current theme.


Understandable. How bout this idea? Do you know how to convert a Mozilla Firefox extension into a Google Chrome extension? If so maybe this will work better.



https://addons.mozilla.org/en-US/firefox/addon/tab-tree/?src=search

Shemhamforash
June 11th, 2016, 11:04 PM
Understandable. How bout this idea? Do you know how to convert a Mozilla Firefox extension into a Google Chrome extension? If so maybe this will work better.



https://addons.mozilla.org/en-US/firefox/addon/tab-tree/?src=search





I think it's not possible to convert a firefox extension to a chrome extension for this purpose.

Nimbi
June 11th, 2016, 11:12 PM
I think it's not possible to convert a firefox extension to a chrome extension for this purpose.

Ahh I see. Tis a shame there. Oh well. Thanks for the quick response. It's much appreciated. :peace:

Nimbi
June 11th, 2016, 11:13 PM
Bah! It won't let me +REP ya, lol. It keeps refusing to let me +REP pplz. Can't +REP anyone on here, lol.

Shemhamforash
June 11th, 2016, 11:14 PM
Bah! It won't let me +REP ya, lol. It keeps refusing to let me +REP pplz. Can't +REP anyone on here, lol.

Maybe that'll be the next thing Mr GRiM disables in the forum settings :cheeky:

Nimbi
June 11th, 2016, 11:17 PM
Maybe that'll be the next thing Mr GRiM disables in the forum settings :cheeky:

God I hope so, lol. I've +REP'd everyone on here so many times that I simply can't +REP anyone anymore. It's starting to get a tad annoying tbh, lol. :cheeky: