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

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

Issue 5696885582987264: Issue 176, Issue 711 - AdBlock Plus icon clipped in IE at high DPI, ABP icon frequently jumps in IE8 (Closed)
Patch Set: Created Jan. 22, 2015, 6:37 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 | no next file » | 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 case DISPID_COMMANDSTATECHANGE: 675 case DISPID_COMMANDSTATECHANGE:
676 if (m_hPaneWnd == NULL) 676 if (m_hPaneWnd == NULL)
677 { 677 {
678 CreateStatusBarPane(); 678 CreateStatusBarPane();
679 } 679 }
680 else 680 else
681 { 681 {
682 if (AdblockPlus::IE::InstalledMajorVersion() > 6) 682 if (AdblockPlus::IE::InstalledMajorVersion() > 6)
683 { 683 {
684 RECT rect; 684 RECT rect;
685 BOOL rectRes = GetClientRect(m_hStatusBarWnd, &rect); 685 //Get the RECT for the leftmost pane (the status text pane)
686 BOOL rectRes = ::SendMessage(m_hStatusBarWnd, SB_GETRECT, 0, (LPARAM)& rect);
686 if (rectRes == TRUE) 687 if (rectRes == TRUE)
687 { 688 {
688 MoveWindow(m_hPaneWnd, rect.right - 200, 0, m_nPaneWidth, rect.botto m - rect.top, TRUE); 689 MoveWindow(m_hPaneWnd, rect.right - m_nPaneWidth, 0, m_nPaneWidth, r ect.bottom - rect.top, TRUE);
689 } 690 }
690 } 691 }
691 } 692 }
692 break; 693 break;
693 694
694 case DISPID_STATUSTEXTCHANGE: 695 case DISPID_STATUSTEXTCHANGE:
695 break; 696 break;
696 697
697 case DISPID_BEFORENAVIGATE2: 698 case DISPID_BEFORENAVIGATE2:
698 { 699 {
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 } 1611 }
1611 } 1612 }
1612 } 1613 }
1613 } 1614 }
1614 1615
1615 // Draw icon 1616 // Draw icon
1616 if (CPluginClient::GetInstance()) 1617 if (CPluginClient::GetInstance())
1617 { 1618 {
1618 HICON hIcon = GetStatusBarIcon(pClass->GetTab()->GetDocumentUrl()); 1619 HICON hIcon = GetStatusBarIcon(pClass->GetTab()->GetDocumentUrl());
1619 1620
1620 int offx = (rcClient.Height() - 16)/2 + nDrawEdge; 1621 int offx = nDrawEdge;
1621 if (hIcon) 1622 if (hIcon)
1622 { 1623 {
1623 ::DrawIconEx(hDC, offx, (rcClient.Height() - 16)/2 + 2, hIcon, 16, 16, NULL, NULL, DI_NORMAL); 1624 ::DrawIconEx(hDC, offx, (rcClient.Height() - 16)/2 + 2, hIcon, 16, 16, NULL, NULL, DI_NORMAL);
1624 offx += 22; 1625 offx += 22;
1625 } 1626 }
1626 #ifdef _DEBUG 1627 #ifdef _DEBUG
1627 // Display version 1628 // Display version
1628 HFONT hFont = (HFONT)::SendMessage(pClass->m_hStatusBarWnd, WM_GETFONT, 0, 0); 1629 HFONT hFont = (HFONT)::SendMessage(pClass->m_hStatusBarWnd, WM_GETFONT, 0, 0);
1629 HGDIOBJ hOldFont = ::SelectObject(hDC,hFont); 1630 HGDIOBJ hOldFont = ::SelectObject(hDC,hFont);
1630 1631
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 } 1871 }
1871 } 1872 }
1872 } 1873 }
1873 1874
1874 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1875 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1875 } 1876 }
1876 1877
1877 return hTabWnd; 1878 return hTabWnd;
1878 1879
1879 } 1880 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld