Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Theming: reduce space between parts(Creating a compact theme for the IDE)
Theming: reduce space between parts [message #1826343] Thu, 23 April 2020 17:50 Go to next message
Pierre-Yves Bigourdan is currently offline Pierre-Yves BigourdanFriend
Messages: 7
Registered: April 2020
Junior Member
Hello,

I'm currently experimenting with building a custom theme for the IDE, and was wondering how I would go about reducing the space between the different IDE parts (I think they're called sash containers?). See the attachment for more information.

Ideally, I would like to have just the borders of the different parts, without the padding in the middle. Can this be done with CSS or a simple custom CSS property handler?

Thanks in advance for your help!

  • Attachment: space.png
    (Size: 5.33KB, Downloaded 126 times)
Re: Theming: reduce space between parts [message #1826388 is a reply to message #1826343] Fri, 24 April 2020 09:03 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
I don't know much about CSS styling, but I thick you want to define the style for the '.MPartSashContainer' CSS selector [1].

If I am correct, the MPartSash is rendered by a SashRenderer. That uses a SashLayout. It seems that sashWidth en margins are hardcoded, but they might be changable with CSS.

To explore the CCS elements you can use the CSS spy [2], latest version available at [3]

[1] https://www.vogella.com/tutorials/Eclipse4CSS/article.html
[2] https://marketplace.eclipse.org/content/eclipse-4-tools-css-spy
[3] https://download.eclipse.org/e4/snapshots/org.eclipse.e4.tools/latest/
Re: Theming: reduce space between parts [message #1826428 is a reply to message #1826388] Fri, 24 April 2020 17:19 Go to previous messageGo to next message
Pierre-Yves Bigourdan is currently offline Pierre-Yves BigourdanFriend
Messages: 7
Registered: April 2020
Junior Member
Thanks for the answer Rolf!

I did a bit of digging and found out this piece of code that allows to override the Sash width: https://github.com/jeeeyul/eclipse-themes/blob/master/net.jeeeyul.eclipse.themes/src/net/jeeeyul/eclipse/themes/css/internal/handlers/SashWidthHandler.java

Unfortunately, setting any value below 2px does not have the desired effect. The resize cursor no longer appears and the space between the parts remains the same. I've even tried setting negative values, but to no avail, the contents of the part seem to "slide underneath" the borders (see attachment), with the space still there.

Re: Theming: reduce space between parts [message #1826538 is a reply to message #1826428] Sun, 26 April 2020 18:52 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
You could open an enhancement bug on Platform UI to support setting the sash width and to support resizing with thin (<4px).
Re: Theming: reduce space between parts [message #1826620 is a reply to message #1826538] Mon, 27 April 2020 20:22 Go to previous message
Pierre-Yves Bigourdan is currently offline Pierre-Yves BigourdanFriend
Messages: 7
Registered: April 2020
Junior Member
Done! See bug 562536.
Previous Topic:Unable to set hierarchical project presentation by default
Next Topic:How to clone/duplicate an existing Eclipse project?
Goto Forum:
  


Current Time: Thu Dec 05 01:13:51 GMT 2024

Powered by FUDForum. Page generated in 0.02986 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top