After upgrading my eclipse to neon from juno, I noticed that I am getting extra space for the min/restore buttons for the c/c++ editor.
looked like this in juno
looks like this in neon
it doesnt look like much in the screenshots but it adds a tabs heights to the whole window. Anyway to get rid of it, or make it smaller like in Juno ?
Don't know how to get rid of the extra space, but the space only occurs when you have multiple editors/views side-by-side in the same tab space. That looks like this:
If you drag the windows such that they are not in the same tab space, then you don't have the extra space:
You can add the following style in the .css file that is active for you. For example, add the following to e4-dark.css for eclipse oxygen's dark style.
#org-eclipse-ui-editorss {
swt-tab-height: 5px;
padding: 0px 2px 2px;
}
Related
In Eclipse Kepler on Linux Mint, selecting items from a tree-view like the Project window is pretty straightforward:
But on the Searches window, matches and potential matches have no background color when you select them. Hence, they become invisible:
How to I change the color of selected text there? I'm guessing it defaults to a system color, but for most other colors you can override that.
In Eclipse Juno this was not a problem, because the selection background color was, like in the Project Window, the same as the system default:
I think that in Kepler the system default background is not working in the Searches window because they forgot to implement it after manually allowing the contents of the tree view to have a different color from the system color specifically for potential matches:
Unfortunately, they didn't add options to change the definite matches and the selected matches color here, otherwise I would probably have figured this out myself. ;)
edit I figured out how to change the background-color of the entire Tree:
Tree {
background-color: #f00;
color: inherit;
background-image: none;
}
But I cannot change for the life of me the color or background of single items. At all. In the end, I'd like to change the background for the selected item so it becomes readable.
Just trying a bunch of stuff, but not working:
.TreeItem:even,
.TreeItem:linesvisible,
.TreeItem:selected,
.TreeItem:unfocused,
.Tree-RowOverlay,
.Tree-Cell,
.Tree-GridLine,
.Tree-Indent {
background-color: #0f0;
color: #f00;
}
Note - In the Kepler screenshots I use the Jeeeyul's Eclipse Themes plugin to change some of the hideous unbelievably terrible design decisions the Eclipse team made for Kepler, but this is unrelated. The font, the colors and the problem of the selections are the same with or without the plugin.
I've applied a custom code coloring theme to eclipse 4.3 (Kepler), but there is this annoying thin vertical white line separating code and line numbers. Is it possible to change it's color somehow?
I'm on Ubuntu 13.10 (Saucy Salamander) 64bit, Java 1.7_45 64bit
UPDATE: I've installed Chrome Theme which allows certain customisation, so I was thinking maybe there is a css to change that line color?
That white (it's not white actually but #F8F8F8) line was haunting my dark theme. Google sent me here but couldn't find a working solution. But I found some clues as to where to look for a solution. If you're running Eclipse on Windows 7, there's a file called e4_default_win7.css inside one of the folders. Just search for it.
In that file the last section is,
CTabFolder Canvas {
background-color: #28446a;
}
Just change the color there. That'll solve the problem. I actually did this for my TrueStudio Eclipse IDE. But this leaves another problem. The text is too close to the line numbers and I don't know how to change the margin between them!
Screenshot - see what I'm talking about
My question is very similar to Stack Overflow question Gigantic Tabs in Eclipse on Ubuntu.
I have tried the solutions presented, but they appear to be old. I have found a solution that nicely handles the toolbar and menus, but not a solution that reduces the size and padding of the disproportionately large tabs (and label) within the panes (see the tab "Package Explorer" in the screen below).
I am happy with the way my OS-wide GTK theme is customized and don't want to change that. Is there a quick fix to reduce the tab sizes of the panes in Eclipse?
I'm using Eclipse for Mobile Developers (Juno) on Ubuntu 12.04. I'll also mention that I really like the way Eclipse appears out of the box in Windows 7, so something similar to that would be ideal.
Here are the eclipse specific GTK styles I'm using:
style "eclin" {
GtkButton::default_border={1,1,1,1}
GtkButton::default_outside_border={1,1,1,1}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=1
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=1
GtkToolbar::space-size=1
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkExpander::expander_size=10
GtkExpander::expander_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::expander-size=12
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
font_name="Liberation Sans,Sans Regular 8"
}
class "GtkWidget" style "eclin"
style "eclin2" {
xthickness=1
ythickness=1
}
class "GtkButton" style "eclin2"
class "GtkToolbar" style "eclin2"
class "GtkPaned" style "eclin2"
Here is a screenshot of what my IDE looks like with the huge tabs:
You can edit Eclipse's CSS instead of messing with the GTK theme.
In your Eclipse directory find the file plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css (there's an * in there, because I guess that the version may change in the future or may be different already). In this file there's a CSS class:
.MPartStack {
font-size: 11;
swt-simple: false;
swt-mru-visible: false;
}
And you have two possible solutions:
change font-size to something smaller
just comment out or remove font-size from this class (works well for me)
And that should do the trick.
Style of tabs can be changed in Eclipse 4.2 by editing CSS. You can change styles directly in Eclipse Preferences window after installing the E4 CSS editor plug-in.
Go to menu Help > Install new software, then install E4 CSS editor (Incubation) plug-in using Eclipse 4 update site (add this link: http://download.eclipse.org/e4/updates/0.12).
After restart, go to Window > Preferences, General > Appearance and now you can edit styles here for any selected theme.
I am using this style for tabs:
.MPartStack {
font-size: 9;
font-family: Liberation Sans;
swt-tab-renderer: null;
swt-tab-height: 22px;
swt-selected-tabs-background: #FFFFFF #ECE9D8 100%;
swt-simple: false;
swt-mru-visible: false;
}
You can specify tabs height using the swt-tab-height option. It's value sets tab height ignoring the font size.
I also wanted to reduce especially the horizontal space in order to fit more tabs, as Eclipse lacks multi-row tabs.
These instructions will go for any platform (not limited to e.g. Ubuntu/GTK).
What I did was:
Reduced the font size
Changed font to something horizontal-compact
Removed the X (close tab) button
...yielding the following result on my system (Win 7):
...and this is how it's done:
Check what CSS layout you're using: Preferences->General->Appearance-> check value of 'Theme:' listbox
Open the corresponding file in <eclipse folder>\plugins\org.eclipse.platform_<your version>\css, e.g. e4_default_win7.css
Modify .MPartStack entries to set font size and font, e.g.:
.MPartStack {
font-size: 8;
font-family: 'Arial Narrow';
swt-simple: true;
swt-mru-visible: false;
}
Add the following entry to remove the X (close icon):
CTabItem {
swt-show-close: false !important;
}
That's it!
Eclipse is now (4.5 Mars) defaulting to GTK3 on Linux. For 4.6 a fix seems to be alredy merged.
Changing SWT_GTK3 environment variable works for Eclipse Mars:
$ export SWT_GTK3=0
or set that variable inline with running eclipse
$ SWT_GTK3=0 /path/to/eclipse/eclipse
To kill it dead just drop this in the root as eclipse.sh:
#!/bin/bash
SWT_GTK3=0 exec env "${0%.sh}"
You may try the theme from https://github.com/jeeeyul/eclipse-themes.
After install this theme, apply it by choosing the theme in Window > Preferences > General > Appearence > Jeeeyul's themes.
And to solve the large tab problem, please refer to https://github.com/jeeeyul/eclipse-themes/wiki/Linux-Huge-Toolbar-Problem.
It's easy and beatiful. Enjoy it!
An alternative way is to select:
System settings > Universal access > Text size as small.
You can edit all small details about tab size here:
EDIT: For anyone coming to this question through searching, you can install a Gnome Theme called Clearlooks Compact to shorten your tabs in Eclipse. This will free up a lot of screen space. You can also check out the answer below to learn how to make the tabs more horizontally compact.
Short version: How do I make a short version of Eclipse's tabs & toolbars in Ubuntu?
I've been looking around for a fix to this on Google, but to no avail. With any GTK theme, I still have this same issue and it's very, very annoying--to the point where I've stopped using Eclipse in favor of gEdit. However, after running pylint from a terminal too. many. times. I've decided I need to find a solution to this issues with Eclipse so I can have PyDev back. Here's what the tabs look like:
alt text http://c0496682.cdn.cloudfiles.rackspacecloud.com/big-tabs.png
As you can see, not only are the tabs exaggerated, but the toolbar is, too: so is the toolbar on the bottom; so are the tabs in the bottom pane. Overall, it's eating up a lot of screen space, which is a hard item to come by on a 17" screen. Any suggestions/fixes?
This can be solved changing your GTK settings;
gedit ~/.gtkrc-2.0
Then add this;
style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"
borrowed from http://ubuntuforums.org/showthread.php?t=1465712
In addition to #Varun Mehta answer, I recommend the following tips for Eclipse 4 (Juno), whose interface is partially dictated and configurable by CSS rules:
In YourEclipseDir/plugins/org.eclipse.platform_4.x.y.v2012zzzzzzzz/css, edit:
e4_basestyle.css
e4_default.css
e4_default_gtk.css
... and adjust those files. I use the following set of tweaks:
set all the margin-* and padding to 0
set swt-shadow-visible: false everywhere you find it, to get rid of those huge shadows
set .MPartStack {font-size} to something smaller than 12
Finally, remember you can disable the toolbar. In 4.0, its state wasn't remembered across sessions, but it seems like the issue is solved in 4.2.1
Bonus resources: Eclipse4/CSS will get you started on Eclipse4 CSS, E4/CSS/SWT Mapping lists other interesting CSS attributes, and CSS Spy will help you inspect the UI.
Screenshot of what I end up with:
EDIT: see also How to remove the close (×) button from Eclipse Juno tabs?
In Addition to Ronans answer, it is possible to change the height of the tabs directly in Eclipse Juno.
edit the css file of your current style (e.g. e4_default_gtk.css) and add
CTabFolder {
tab-height: 16px;
}
Note: CTabFolder ... not add this to CTabFolder Canvas!
I too have suffered from this quite a bit, before I found the solution by changing the general appearance of my IDE.
You can try and customize the look-and-feel or you Eclipse Environment from,
Go to : Window -> Preferences -> General -> Appearance.
try setting,
Current Presentation to " Default ".
Enable " Traditional Style Tabs " (for rectangular tabs.)
Disable Animation ( if you don't like swoosh effect.)
Note: the Default Eclipse 4 just got a bit better with bug 420238 closed:
[CSS] Reduce whitespace usage in the default Eclipse themes
Before:
After:
See Lars Vogel's article about it:
If you fire up the next Eclipse 4.4 milestone build, Eclipse uses much less whitespace and leaves more space for the important content.
(That would be 4.4 M5)
While this is on a technical level a trivial change, I hope that this will improve the initial perception people have in using Eclipse.
A big thanks to Daniel Rolka, Robin Stocker and Dani Megert for doing the majority of the work and a big thanks all involved parties in the Bug report to get this change accepted.
If you really want to make the tabs nice an' short, take a gander at Clearlooks Compact.
I preferred to just hit the whole IDE with a splash of "meh," so here's what I ended up with.
I'm aware of color themes for Eclipse: I've used it to change most of the editor colors, and that's great.
But that wasn't enough, there's still too much white. How to change it? (It hurts my eyes.)
I've searched in the preferences (both using Eclipse itself and editing the files) for instances of white (255,255,255) and changed them all. Looks like I'm missing something.
Each time you see white or gray color, this is more than likely related to OS system colors.
In other word, to truly have an Eclipse full dark theme, you need first to have a dark theme for your OS, and then your Eclipse will follow.
Here is an example on a Windows7, modifying just one parameter:
alt text http://img92.imageshack.us/img92/5053/eclipsered.png
Probably not the answer you're looking for, but the IntelliJ community edition is an excellent free IDE and is very easy to use. The background colours can be set and changed to many colours. There are also a number of free plugins which can customize backgrounds and the look and feel. Well worth a look if you don't find exactly what you're looking for with Eclipse.
I see you're on the Mac - the easiest thing to do would go to System Preferences -> Accessibility -> Seeing -> Display -> "White on Black". It will invert everything on your screen though, I don't know, if you'd like that?
YES, THERE IS A WAY TO DO IT
You will need to configure 3 things in order to get your dark UI.
1) Java Editor Colors
This is the source code edition area. You can use http://eclipsecolorthemes.org/ for the editor part, though those colors can be manually edited by default.
2) Eclipse UI
The UI colors can be edited with the addin Chrome Theme which can be found in the eclipse market place or in the following link https://github.com/jeeeyul/eclipse-themes/. If you want a dark theme just edit away until you find the colors that suit you.
3) Final touches
After doing the previous steps, some colors will still match the OS colors. To darken what's left, just get the pre-baked Dark Juno theme from https://github.com/eclipse-color-theme/eclipse-ui-themes. Download the zip file and unzip it into your dropins folder (which is located in your eclipse folder). If the dropins folder doesn't exist, just create it.
Restart eclipse and you are set.
You can try these steps:
Find the path: ~/.p2/pool/plugins/org.eclipse.ui.themes_*.*.****.v********-****/css/e4_basestyle.css;
Use a text editor (example: Sublime Text 3) to open e4_basestyle.css if you used default theme config;
Append this code and save
#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree {
font-size: 10px;
font-family: "DejaVu Sans Mono for Powerline";
background-color: RGB(223,238,223);
},
#org-eclipse-ui-views-ContentOutline Tree,
#PerspectiveSwitcher ToolBar {
font-size: 10px;
font-family: "DejaVu Sans Mono for Powerline";
background-color: RGB(223,238,223);
}
Restart Eclipse. It is like this: result