Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Coolbar cuts off text
Coolbar cuts off text [message #10599] Wed, 21 March 2007 12:33 Go to next message
Markus  rüger is currently offline Markus rügerFriend
Messages: 369
Registered: July 2009
Senior Member
Hello,
if I have actions with text in the cool bar added as ActionContributionItem
with the property ActionContributionItem.MODE_FORCE_TEXT then the text of
the last action is cutted a little bit so that the text does not display
correctly. You can reproduce it, if You change the method createToolBar in
the action bar advisor of Your Demo to the code below. It seems that it cuts
more for every action that is added with text.

private void createToolBar( ICoolBarManager coolBar, final String name ) {
IToolBarManager toolbar = new ToolBarManager( RWT.FLAT | RWT.RIGHT );
coolBar.add( new ToolBarContributionItem( toolbar, name ) );
toolbar.add( exitAction );
int aboutActionAdded = 5;
for(int i = 0; i < aboutActionAdded; i++) {
ActionContributionItem contributionItem =
new ActionContributionItem(aboutAction);
contributionItem.setMode(ActionContributionItem.MODE_FORCE_T EXT);
toolbar.add(contributionItem);
}
}



Best regards,

Markus
Re: Coolbar cuts off text [message #11538 is a reply to message #10599] Thu, 22 March 2007 19:29 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 335
Registered: July 2009
Senior Member
Hi Markus,

that looks sad. I added a two extra pixels in the size caluclation of
ToolItem when image and text are display together.
But don't expect this to work under all circumstances. The current text
size calculation (rather an estimation to be true) might add to this. We
will replace this with a proper calculation in the future. Some more
information on this can be found here:
http://wiki.eclipse.org/index.php/18_Fonts#Font_Size_Measure ments

Cheers,
Rüdiger


Markus Krüger wrote:
> Hello,
> if I have actions with text in the cool bar added as ActionContributionItem
> with the property ActionContributionItem.MODE_FORCE_TEXT then the text of
> the last action is cutted a little bit so that the text does not display
> correctly. You can reproduce it, if You change the method createToolBar in
> the action bar advisor of Your Demo to the code below. It seems that it cuts
> more for every action that is added with text.
>
> private void createToolBar( ICoolBarManager coolBar, final String name ) {
> IToolBarManager toolbar = new ToolBarManager( RWT.FLAT | RWT.RIGHT );
> coolBar.add( new ToolBarContributionItem( toolbar, name ) );
> toolbar.add( exitAction );
> int aboutActionAdded = 5;
> for(int i = 0; i < aboutActionAdded; i++) {
> ActionContributionItem contributionItem =
> new ActionContributionItem(aboutAction);
> contributionItem.setMode(ActionContributionItem.MODE_FORCE_T EXT);
> toolbar.add(contributionItem);
> }
> }
>
>
>
> Best regards,
>
> Markus
>
>
Previous Topic:Icons in menue
Next Topic:Header and Items table set visible
Goto Forum:
  


Current Time: Thu Mar 28 19:16:02 GMT 2024

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

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

Back to the top