aMule Forum

English => Skins & GUI => Topic started by: greek on June 14, 2008, 05:54:23 PM

Title: Amule icons (priscilla skin)
Post by: greek on June 14, 2008, 05:54:23 PM
Hello, I was bored and I created some icons for aMule's toolbar. I am not a professional, just playing around. Let me know if you have suggestions or you want to work on those.
Title: Re: Amule icons
Post by: wuischke on June 14, 2008, 09:37:37 PM
Very nice, I like them!

I tried to convert them into an aMule skin, but I realized I forgot to add transparency and now I'm too lazy to re-edit all files.

aMule skins are very simple: Create a 32x32px png file for every element, save it according to a naming sheme and put it into an zip file. See http://www.amule.org/wiki/index.php/Skins for more information.

P.S. Please excuse any other errors in the skin, I couldn't test it.
Title: Re: Amule icons
Post by: greek on June 14, 2008, 11:00:07 PM
Oh I see! That was quite easy. Is 32x32 the maximum it can get? Those pictures are meant to be viewed in higher resolution. :(
In any case I am contributing a skin named "priscilla".
Title: Re: Amule icons
Post by: wuischke on June 15, 2008, 12:32:52 AM
Currently the toolbar maximum is 32x32 (client maximum 16x16), that's a wx limitation I'm afraid. I would like to be able to use SVG graphics, but I'm not sure if this is possible. I should check on this, but amuleweb has priority for now.

Edit: Could you please make a screenshot, too?
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 16, 2008, 05:20:36 AM
New version and screenshot.
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 17, 2008, 03:15:32 AM
Some more modifications. I will call this version 0.2. Let me know what you think.
Title: Re: Amule icons (priscilla skin)
Post by: wuischke on June 17, 2008, 04:20:48 PM
And tomorrow we'll see this skin in aMule, thank you.
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 18, 2008, 11:50:58 AM
Hello, I had a typo in one of the filenames and that resulted in a misbehavior of the skin. I should have checked! Here is the correct version.

Also I have a question: every time the skin changes when amule is connected, the left most icon switches to the "Toolbar_Connect" icon and it has 3 dots underneath, even though aMule remains connected. Is this a bug or a feature?
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 18, 2008, 11:54:47 AM
Also I have two more questions:
1) Is there anyway to only keep the icons and not the text in the tool bar?
2) Where are the sources for the icons for example the online Users, or the icon of the button that downloads the server list?
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 18, 2008, 12:16:00 PM
wait, I think I saw it. Is everything under muuli_wdr.cpp?
Title: Re: Amule icons (priscilla skin)
Post by: wuischke on June 18, 2008, 12:35:06 PM
1) Yes, there is, but it is currently not implemented, iirc.
2) You can find them in muuli.wdr, which has to be opened with wxDesigner. Alternatively you can use the cpp file, where they are stored, too. Please be aware that not all icons are skinnable yet (I'm to blame) and I'm afraid these two are not.
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 20, 2008, 07:05:02 PM
Please update the priscilla.zip skin in aMule SVN with the one posted in this thread.
Title: Re: Amule icons (priscilla skin)
Post by: wuischke on June 20, 2008, 07:15:23 PM
Thanks, I overlooked it. Please consider editing your responses in place of posting multiple times, this will make it easier for me to track changes.

Edit: I'm afraid the 3 dot thingy is a bug, could you please have a look at it? I've got a major headache after reading through countless Italian texts of law - without finding what I was looking for. :(
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 21, 2008, 03:54:54 AM
Ok, that was easy to fix. I don't guarantee that I will find the bugs so fast next time!

In file amuleDlg.cpp, replace the lines:



// Placeholder. Gets updated by ShowConnectionState
wndToolbar->AddTool(ID_BUTTONCONNECT, wxT("..."), m_tblist.GetBitmap(0));




with the lines





   // tmp_index takes values 0,1,2 corresponding to
   // "Connect", "Disconnect" and "Connecting" respectively.
   short tmp_index;
   wxString tmp_btn_label;

   if (theApp->serverconnect->IsConnecting()) {
     tmp_index=2;
     tmp_btn_label=_("Connecting");
   }
   else
     if (theApp->serverconnect->IsConnected()) {
       tmp_index=1;
       tmp_btn_label=_("Disconnect");
     }
     else {
       tmp_index=0;
       tmp_btn_label=_("Connect");
     }

   wndToolbar->AddTool(ID_BUTTONCONNECT,tmp_btn_label, m_tblist.GetBitmap(tmp_index));
Title: Re: Amule icons (priscilla skin)
Post by: greek on June 21, 2008, 03:58:20 AM
From this little exercise, I realized that the apply_skin code is called twice upon startup. This explains why on my mac the toolbar flickers a bit in the beginning. There is definitely an inefficiency there, but I don't think its worth fixing without a redisign ...
Title: Re: Amule icons (priscilla skin)
Post by: wuischke on June 21, 2008, 06:23:57 PM
Turns out this should never happen, because ShowConnectionState() is called at the end of the Apply_Toolbar_Skin() function.

Would be interesting to know why this didn't happen...
Title: Re: Amule icons (priscilla skin)
Post by: wuischke on June 21, 2008, 08:16:19 PM
I've changed the behaviour of the function slightly and one can now force the update.

Code: [Select]
Index: src/amuleDlg.cpp
===================================================================
--- src/amuleDlg.cpp (revisione 8719)
+++ src/amuleDlg.cpp (copia locale)
@@ -646,7 +646,7 @@
 }
 
 
-void CamuleDlg::ShowConnectionState()
+void CamuleDlg::ShowConnectionState(bool skinChanged)
 {
  static wxImageList status_arrows(16,16,true,0);
  if (!status_arrows.GetImageCount()) {
@@ -748,7 +748,7 @@
  currentState = ECS_Disconnected;
  }
 
- if (currentState != s_oldState) {
+ if ( (true == skinChanged) || (currentState != s_oldState) ) {
  wxWindowUpdateLocker freezer(m_wndToolbar);
 
  wxToolBarToolBase* toolbarTool = m_wndToolbar->RemoveTool(ID_BUTTONCONNECT);
@@ -1333,7 +1333,7 @@
  wndToolbar->Realize();
 
  // Updates the "Connect" button, and so on.
- ShowConnectionState();
+ ShowConnectionState(true);
 }
 
 
Index: src/amuleDlg.h
===================================================================
--- src/amuleDlg.h (revisione 8719)
+++ src/amuleDlg.h (copia locale)
@@ -118,7 +118,7 @@
  void ResetLog(int id);
 
  void ShowUserCount(const wxString& info = wxEmptyString);
- void ShowConnectionState();
+ void ShowConnectionState(bool skinChanged = false);
  void ShowTransferRate();
 
  bool StatisticsWindowActive()
Title: Re: Amule icons (priscilla skin)
Post by: niklotea on July 18, 2008, 04:07:43 PM
i like your icons...
Title: Re: Amule icons (priscilla skin)
Post by: greek on July 19, 2008, 03:40:34 PM
thaks, you can post feedback. I would like to improve them :)