소스 검색

Reduce icon size

Signed-off-by: amzn-mike <[email protected]>
amzn-mike 2 년 전
부모
커밋
c314cec864
2개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 3
      Code/Tools/AssetProcessor/native/ui/GoToButtonDelegate.cpp
  2. 2 1
      Code/Tools/AssetProcessor/native/ui/GoToButtonDelegate.h

+ 5 - 3
Code/Tools/AssetProcessor/native/ui/GoToButtonDelegate.cpp

@@ -26,14 +26,16 @@ namespace AssetProcessor
 
         if (index.data().canConvert<GoToButtonData>())
         {
+            constexpr int MarginPX = 3;
+            auto marginRect = option.rect.marginsRemoved(QMargins(MarginPX, MarginPX, MarginPX, MarginPX));
+
             if (option.state & QStyle::State_MouseOver)
             {
-
-                m_hoverIcon.paint(painter, option.rect);
+                m_hoverIcon.paint(painter, marginRect);
             }
             else
             {
-                m_icon.paint(painter, option.rect);
+                m_icon.paint(painter, marginRect);
             }
         }
     }

+ 2 - 1
Code/Tools/AssetProcessor/native/ui/GoToButtonDelegate.h

@@ -44,7 +44,8 @@ namespace AssetProcessor
 
     protected:
 
-        QIcon m_icon, m_hoverIcon;
+        QIcon m_icon;
+        QIcon m_hoverIcon;
     };
 } // namespace AssetProcessor