Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Toolbar doesn't show any Icons
Toolbar doesn't show any Icons [message #1690876] Tue, 31 March 2015 17:56 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hello there,

I'm using the mars release and unfortunately the toolbar doesn't show any icons although I added them to my AbstractFormToolButton's:
@Order(1000.0)
  public class SearchTool extends AbstractFormToolButton {

    @Override
    protected String getConfiguredIconId() {
      return AbstractIcons.SmartFieldBrowse;
    }

    @Override
    protected String getConfiguredText() {
      return TEXTS.get("Search");
    }

    @Override
    protected boolean getConfiguredToggleAction() {
      return false;
    }

    @Override
    protected void execAction() throws ProcessingException {
      SERVICES.getService(ICreateUserService.class).createUser("peter", "peter", 100);
    }
  }

  @Order(2000.0)
  public class AboutTool extends AbstractFormToolButton {

    @Override
    protected String getConfiguredIconId() {
      return AbstractIcons.StatusInfo;
    }

    @Override
    protected String getConfiguredText() {
      return null;
    }

    @Override
    protected boolean getConfiguredToggleAction() {
      return false;
    }

    @Override
    public void execAction() throws ProcessingException {
      ScoutInfoForm form = new ScoutInfoForm();
      form.startModify();
    }
  }

  @Order(3000.0)
  public class LogoffTool extends AbstractFormToolButton {

    @Override
    public void execAction() throws ProcessingException {
      ClientJob.getCurrentSession(ClientSession.class).stopSession();
    }

    @Override
    protected String getConfiguredIconId() {
      return AbstractIcons.Gears;
    }

    @Override
    protected String getConfiguredText() {
      return null;
    }

    @Override
    protected boolean getConfiguredToggleAction() {
      return false;
    }
  }


And here is how it looks like:

index.php/fa/21396/0/

Is it related to Scout or RAP itself?

Regards,

Peter

[Updated on: Tue, 31 March 2015 18:01]

Report message to a moderator

Re: Toolbar doesn't show any Icons [message #1691040 is a reply to message #1690876] Wed, 01 April 2015 19:24 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
When you mentioned it in this other thread, I tried and managed to reproduce it (even with Luna).

I am pretty sure that there is a workaround, because the icons are displayed in the demo widget application (live demo, source). I just need to figure out how this is done.
Re: Toolbar doesn't show any Icons [message #1691068 is a reply to message #1691040] Thu, 02 April 2015 06:11 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi Jeremie ,
Jeremie Bresson wrote on Wed, 01 April 2015 19:24
When you mentioned it in this other thread, I tried and managed to reproduce it (even with Luna).


That's why I started a new thread Smile

Jeremie Bresson wrote on Wed, 01 April 2015 19:24

I am pretty sure that there is a workaround, because the icons are displayed in the demo widget application (live demo, source). I just need to figure out how this is done.


I thought so too... So it seems a bug in the Scout SDK?

Regards,

Peter
Re: Toolbar doesn't show any Icons [message #1691220 is a reply to message #1691068] Fri, 03 April 2015 14:27 Go to previous messageGo to next message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 11
Registered: October 2014
Junior Member
Hello Peter,

In RAP, i only got it working by adding some CSS to the application.css file, like this (the colors are from my custom theme, so ignore them if you use the standard Rayo theme):

/* User settings toolbutton */
Button-FocusIndicator.toolButton-UserSettingsTool {
  border: none;
}

Button.toolButton-UserSettingsTool {
  padding: 15px 15px;
  background-image: url( theme/img/misc/TMS-user_12x16.png );
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;  
}

Button.toolButton-active-UserSettingsTool:selected {
  background-image: url( theme/img/misc/TMS-user_12x16.png );
  background-repeat: no-repeat;
  background-position: center; 
  background-color: #FE9A23; 
}

Button.toolButton-active-UserSettingsTool:selected:hover {
  background-image: url( theme/img/misc/TMS-user_12x16.png );
  background-repeat: no-repeat;
  background-position: center; 
  background-color: #FE9A23; 
}

Button.toolButton-UserSettingsTool:hover {
  background-image: url( theme/img/misc/TMS-user_12x16.png );
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;  
}

Button.toolButton-UserSettingsTool:pressed {
  background-image: url( theme/img/misc/TMS-user_12x16.png );
  background-repeat: no-repeat;
  background-position: center;
  background-color: #3A6EA5; 
}



Looks like this:
index.php/fa/21433/0/

index.php/fa/21432/0/

Hope this helps

Regards,
Michiel

[Updated on: Fri, 03 April 2015 14:35]

Report message to a moderator

Re: Toolbar doesn't show any Icons [message #1691267 is a reply to message #1691220] Sat, 04 April 2015 09:42 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi Michiel,

I have to give it a try. How do the css settings correspond to the toolbar buttons in code?

Your screenshot looks very promising. Would it be possible that you share the whole screen with us?

Regards,

Peter
Re: Toolbar doesn't show any Icons [message #1691295 is a reply to message #1691267] Sat, 04 April 2015 21:20 Go to previous messageGo to next message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 11
Registered: October 2014
Junior Member
Hi Peter,

Just replace the 'UserSettingsTool' in the CSS with your tool class names, like 'AboutTool', ' SearchTool' or 'LogoffTool' , that's it.

I attached screenshot from our application we are developing.
I played around a bit with the CSS and created a style that is a bit more in line with our company style.

Regards,
Michiel

Re: Toolbar doesn't show any Icons [message #1691408 is a reply to message #1691295] Tue, 07 April 2015 05:48 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi Michiel,

that looks amazing. I would have some more specific questions on the screenshot. But I guess they are off topic here.... Would a pm somehow be possible?

Peter
Re: Toolbar doesn't show any Icons [message #1691416 is a reply to message #1691408] Tue, 07 April 2015 06:50 Go to previous messageGo to next message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 11
Registered: October 2014
Junior Member
Hi Peter,

Sure, you can send me a PM here if you have some questions.

Regards,
Michiel
Re: Toolbar doesn't show any Icons [message #1691420 is a reply to message #1691416] Tue, 07 April 2015 07:43 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi,

seems I can't... Or at least I'm too dumb...

Can you send me a pm in the forum?

Peter
Re: Toolbar doesn't show any Icons [message #1691441 is a reply to message #1691420] Tue, 07 April 2015 09:41 Go to previous messageGo to next message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 11
Registered: October 2014
Junior Member
mmm.. can't seem to find it either..
I modified my user settings in the Control panel to allow PM, but i do not see any option to send one..

you can send me an email at ....

[Updated on: Tue, 07 April 2015 10:43]

Report message to a moderator

Re: Toolbar doesn't show any Icons [message #1692866 is a reply to message #1691040] Mon, 20 April 2015 10:10 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am back from my holidays, sorry for the delay.

Jeremie Bresson wrote on Wed, 01 April 2015 21:24
I am pretty sure that there is a workaround, because the icons are displayed in the demo widget application (live demo, source). I just need to figure out how this is done.


Ok, I have figured out how this is done.

The images are defined twice:
* Client (used in the desktop client)
- org.eclipsescout.demo.widgets.client/resources/icons/star_red.png
- org.eclipsescout.demo.widgets.client/resources/icons/star_red.png

* RAP Bundle (used for the RAP client)
- org.eclipsescout.demo.widgets.ui.rap/theme/img/button/tool/star_red.png
- org.eclipsescout.demo.widgets.ui.rap/theme/img/button/tool/star_yellow.png

In the RAP client, you also need to customize the CSS, to bind the icon defined in the RAP Bundle with the Tool Button:
org.eclipsescout.demo.widgets.ui.rap/theme/application.css

I do not know why this workaround is necessary. This is probably a limitation of RAP. This was the case with Luna is again the case with Mars. As you know the Neon Version of Scout will be without RAP-UI. I doubt something will be changed for the Mars release.
Previous Topic:Best Practices - Security Roles and Permissions
Next Topic:java.lang.SecurityException: /rap request is not authenticated with a Subject
Goto Forum:
  


Current Time: Tue Mar 19 05:50:20 GMT 2024

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

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

Back to the top