Skip to content

Commit

Permalink
Fix for absent style-values
Browse files Browse the repository at this point in the history
  • Loading branch information
xtne6f committed Aug 11, 2016
1 parent f5ec2a1 commit dcd54e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions NicoJK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ bool CNicoJK::Initialize()
m_pApp->AddLog(L"OsdCompositorを初期化しました。");
}
int dpi = m_pApp->GetDPIFromWindow(m_pApp->GetAppWindow());
int iconWidth, iconHeight;
bool bSmallIcon = (!m_pApp->GetStyleValuePixels(L"side-bar.item.icon.width", dpi, &iconWidth) || iconWidth <= 16) &&
(!m_pApp->GetStyleValuePixels(L"side-bar.item.icon.height", dpi, &iconHeight) || iconHeight <= 16);
int iconWidth = 16 * dpi / 96;
int iconHeight = 16 * dpi / 96;
m_pApp->GetStyleValuePixels(L"side-bar.item.icon.width", dpi, &iconWidth);
m_pApp->GetStyleValuePixels(L"side-bar.item.icon.height", dpi, &iconHeight);
bool bSmallIcon = iconWidth <= 16 && iconHeight <= 16;
// アイコンを登録
m_pApp->RegisterPluginIconFromResource(g_hinstDLL, MAKEINTRESOURCE(IDB_ICON));

Expand Down

0 comments on commit dcd54e9

Please sign in to comment.