Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginClass.cpp

Issue 6210609305616384: Issue 1538 - Replace ABP icon with new one (v.1.1) - for Internet Explorer (Closed)
Patch Set: Created Jan. 24, 2015, 3:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/res/blocking.ico » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 988
989 // Calculate pane height 989 // Calculate pane height
990 AdblockPlus::Rectangle rcStatusBar; 990 AdblockPlus::Rectangle rcStatusBar;
991 ::GetClientRect(hWndStatusBar, &rcStatusBar); 991 ::GetClientRect(hWndStatusBar, &rcStatusBar);
992 992
993 if (rcStatusBar.Height() > 0) 993 if (rcStatusBar.Height() > 0)
994 { 994 {
995 #ifdef _DEBUG 995 #ifdef _DEBUG
996 m_nPaneWidth = 70; 996 m_nPaneWidth = 70;
997 #else 997 #else
998 m_nPaneWidth = min(rcStatusBar.Height(), 22); 998 m_nPaneWidth = min(rcStatusBar.Height(), 32);
999 #endif 999 #endif
1000 } 1000 }
1001 else 1001 else
1002 { 1002 {
1003 #ifdef _DEBUG 1003 #ifdef _DEBUG
1004 m_nPaneWidth = 70; 1004 m_nPaneWidth = 70;
1005 #else 1005 #else
1006 m_nPaneWidth = 22; 1006 m_nPaneWidth = 32;
1007 #endif 1007 #endif
1008 } 1008 }
1009 // Create pane window 1009 // Create pane window
1010 HWND hWndNewPane = ::CreateWindowEx( 1010 HWND hWndNewPane = ::CreateWindowEx(
1011 NULL, 1011 NULL,
1012 MAKEINTATOM(GetAtomPaneClass()), 1012 MAKEINTATOM(GetAtomPaneClass()),
1013 L"", 1013 L"",
1014 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 1014 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
1015 rcStatusBar.Width() - 500,0,m_nPaneWidth,rcStatusBar.Height(), 1015 rcStatusBar.Width() - 500,0,m_nPaneWidth,rcStatusBar.Height(),
1016 hWndStatusBar, 1016 hWndStatusBar,
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 } 1614 }
1615 1615
1616 // Draw icon 1616 // Draw icon
1617 if (CPluginClient::GetInstance()) 1617 if (CPluginClient::GetInstance())
1618 { 1618 {
1619 HICON hIcon = GetStatusBarIcon(pClass->GetTab()->GetDocumentUrl()); 1619 HICON hIcon = GetStatusBarIcon(pClass->GetTab()->GetDocumentUrl());
1620 1620
1621 int offx = nDrawEdge; 1621 int offx = nDrawEdge;
1622 if (hIcon) 1622 if (hIcon)
1623 { 1623 {
1624 ::DrawIconEx(hDC, offx, (rcClient.Height() - 16)/2 + 2, hIcon, 16, 16, NULL, NULL, DI_NORMAL); 1624 ::DrawIconEx(hDC, offx, 0, hIcon, rcClient.Height() - 2, rcClient.Heig ht() - 2, NULL, NULL, DI_NORMAL);
1625 offx += 22; 1625 offx += 32;
1626 } 1626 }
1627 #ifdef _DEBUG 1627 #ifdef _DEBUG
1628 // Display version 1628 // Display version
1629 HFONT hFont = (HFONT)::SendMessage(pClass->m_hStatusBarWnd, WM_GETFONT, 0, 0); 1629 HFONT hFont = (HFONT)::SendMessage(pClass->m_hStatusBarWnd, WM_GETFONT, 0, 0);
1630 HGDIOBJ hOldFont = ::SelectObject(hDC,hFont); 1630 HGDIOBJ hOldFont = ::SelectObject(hDC,hFont);
1631 1631
1632 AdblockPlus::Rectangle rcText = rcClient; 1632 AdblockPlus::Rectangle rcText = rcClient;
1633 rcText.left += offx; 1633 rcText.left += offx;
1634 ::SetBkMode(hDC, TRANSPARENT); 1634 ::SetBkMode(hDC, TRANSPARENT);
1635 ::DrawTextW(hDC, IEPLUGIN_VERSION, -1, &rcText, DT_WORD_ELLIPSIS|DT_LEFT |DT_SINGLELINE|DT_VCENTER); 1635 ::DrawTextW(hDC, IEPLUGIN_VERSION, -1, &rcText, DT_WORD_ELLIPSIS|DT_LEFT |DT_SINGLELINE|DT_VCENTER);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 } 1871 }
1872 } 1872 }
1873 } 1873 }
1874 1874
1875 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1875 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1876 } 1876 }
1877 1877
1878 return hTabWnd; 1878 return hTabWnd;
1879 1879
1880 } 1880 }
OLDNEW
« no previous file with comments | « no previous file | src/res/blocking.ico » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld