aMule Forum
English => Skins & GUI => Topic started 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.
-
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.
-
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".
-
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?
-
New version and screenshot.
-
Some more modifications. I will call this version 0.2. Let me know what you think.
-
And tomorrow we'll see this skin in aMule, thank you.
-
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?
-
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?
-
wait, I think I saw it. Is everything under muuli_wdr.cpp?
-
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.
-
Please update the priscilla.zip skin in aMule SVN with the one posted in this thread.
-
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. :(
-
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));
-
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 ...
-
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...
-
I've changed the behaviour of the function slightly and one can now force the update.
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()
-
i like your icons...
-
thaks, you can post feedback. I would like to improve them :)