This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 233206 - [dark] [nimbus] terminal buttons need to much vertical space
Summary: [dark] [nimbus] terminal buttons need to much vertical space
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-22 18:16 UTC by markiewb
Modified: 2013-07-28 14:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows the issue (47.58 KB, image/png)
2013-07-22 18:16 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-07-22 18:16:41 UTC
Created attachment 137583 [details]
Shows the issue

The terminal toolbar buttons on the left side take too much vertical space when using Dark Nimbus. See screenshot. It works using Dark Metal.


Product Version: NetBeans IDE Dev (Build 201307212300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Andrew Krasny 2013-07-22 23:42:01 UTC
The problem is that there is a moment when two toolbars are drawn.

BTW, how did you get this screenshot? I cannot reproduce this behavior. Or, to be more precise, I can see the same picture, but it stays for a very short period of time. After some refresh everything comes to order.

To see this effect one can put a breakpoint to line 127 (method doWork()) of TerminalSupportImpl.java from dlight.terminal module.



There is an actions toolbar that belongs to a terminal (TerminalContainerCommon.actionBar) and there is another one that comes from TerminalContainerTopComponent (TerminalContainerTopComponent.actionsBar).

As far as I understand the latter one was introduced because there was an idea to have a toolbar that is _always_ visible (even if no terminal container is open). So terminal itself is created without any additional actions (it's toolbar is empty) and  TerminalContainerTopComponent.actionsBar is populated with two actions "open Local Terminal/open Remote Terminal".

When TerminalContainerTopComponent is opened it invokes 'open Local Terminal' action. This action, in turn, opens a TerminalContainer, and goes off-EDT. At this moment TerminalContainer's toolbar is drawn (empty, but it's border is visible). Then (line 171 [term.getIO(tabTitle, null, ioContainer)] of TerminalSupportImpl.java) initiates a logic that sets terminal container's actions to null. And this, in turn makes toolbar invisible (TerminalContainerCommon.java:519).


As a possible fix I would suggest to create TerminalContainer's toolbar initially invisible. 


diff --git a/terminal/src/org/netbeans/modules/terminal/iocontainer/TerminalContainerCommon.java b/terminal/src/org/netbeans/modules/terminal/iocontainer/TerminalContainerCommon.java
--- a/terminal/src/org/netbeans/modules/terminal/iocontainer/TerminalContainerCommon.java
+++ b/terminal/src/org/netbeans/modules/terminal/iocontainer/TerminalContainerCommon.java
@@ -376,6 +376,7 @@
         actionBar.setFloatable(false);
         fixSize(actionBar);
         add(actionBar, BorderLayout.WEST);
+	actionBar.setVisible(false);
 
         findBar = new FindBar(new FindBar.Owner() {
Comment 2 Andrew Krasny 2013-07-25 10:02:43 UTC
http://hg.netbeans.org/cnd-main/rev/abd61d58b0f8
Comment 3 Quality Engineering 2013-07-26 02:49:41 UTC
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/abd61d58b0f8
User: Andrew Krasny <akrasny@netbeans.org>
Log: Bug #233206 - [dark] [nimbus] terminal buttons need to much vertical space
Comment 4 markiewb 2013-07-28 14:41:24 UTC
Verified in 201307262300