Skip to content

Commit

Permalink
feat(ui): high-res status icons; display larger icons in WeaselPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Feb 8, 2019
1 parent a32f2d1 commit 093fa80
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions WeaselTSF/LanguageBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ STDAPI CLangBarItemButton::QueryInterface(REFIID riid, void **ppvObject)
*ppvObject = (ITfLangBarItemButton *) this;
else if (IsEqualIID(riid, IID_ITfSource))
*ppvObject = (ITfSource *) this;

if (*ppvObject)
{
AddRef();
Expand Down Expand Up @@ -153,7 +153,13 @@ STDAPI CLangBarItemButton::OnMenuSelect(UINT wID)

STDAPI CLangBarItemButton::GetIcon(HICON *phIcon)
{
*phIcon = (HICON) LoadImageW(g_hInst, MAKEINTRESOURCEW(ascii_mode ? IDI_EN_256 : IDI_ZH_256), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED);
*phIcon = (HICON) LoadImageW(
g_hInst,
MAKEINTRESOURCEW(ascii_mode ? IDI_EN : IDI_ZH),
IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
LR_SHARED);
return (*phIcon == NULL)? E_FAIL: S_OK;
}

Expand Down
Binary file modified WeaselTSF/WeaselTSF.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion WeaselUI/StandardLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace weasel
{
const int MAX_CANDIDATES_COUNT = 10;
const int STATUS_ICON_SIZE = GetSystemMetrics(SM_CXSMICON);
const int STATUS_ICON_SIZE = GetSystemMetrics(SM_CXICON);

class StandardLayout: public Layout
{
Expand Down
Binary file modified include/resource.h
Binary file not shown.
Binary file modified resource/en.ico
Binary file not shown.
Binary file removed resource/en_256.ico
Binary file not shown.
Binary file modified resource/reload.ico
Binary file not shown.
Binary file modified resource/zh.ico
Binary file not shown.
Binary file removed resource/zh_256.ico
Binary file not shown.

0 comments on commit 093fa80

Please sign in to comment.