]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/ScintillaWX.cpp
preserve type when loaded image is rescaled, #11543
[wxWidgets.git] / src / stc / ScintillaWX.cpp
index 3777731ae60344ca9585ce6c915c38651bc0be6d..0f9a5281ab967649f50a8625af41d8da0a4451f7 100644 (file)
@@ -103,9 +103,9 @@ public:
                          | wxFRAME_FLOAT_ON_PARENT
                          | wxBORDER_NONE
 #ifdef __WXMAC__
                          | wxFRAME_FLOAT_ON_PARENT
                          | wxBORDER_NONE
 #ifdef __WXMAC__
-                         | wxPOPUP_WINDOW  
+                         | wxPOPUP_WINDOW
 #endif
 #endif
-            ), 
+            ),
 #endif
           m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
         {
 #endif
           m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord)
         {
@@ -180,7 +180,7 @@ public:
         return rv;
     }
 #endif
         return rv;
     }
 #endif
-    
+
     wxPoint GetMyPosition()
     {
         return wxPoint(m_cx, m_cy);
     wxPoint GetMyPosition()
     {
         return wxPoint(m_cx, m_cy);
@@ -263,11 +263,7 @@ void ScintillaWX::Initialise() {
     dropTarget->SetScintilla(this);
     stc->SetDropTarget(dropTarget);
 #endif // wxUSE_DRAG_AND_DROP
     dropTarget->SetScintilla(this);
     stc->SetDropTarget(dropTarget);
 #endif // wxUSE_DRAG_AND_DROP
-#ifdef __WXMAC__
-    vs.extraFontFlag = false;  // UseAntiAliasing
-#else
     vs.extraFontFlag = true;   // UseAntiAliasing
     vs.extraFontFlag = true;   // UseAntiAliasing
-#endif
 }
 
 
 }
 
 
@@ -504,7 +500,7 @@ void ScintillaWX::Paste() {
 
 #if wxUSE_UNICODE
         // free up the old character buffer in case the text is real big
 
 #if wxUSE_UNICODE
         // free up the old character buffer in case the text is real big
-        data.SetText(wxEmptyString); 
+        data.SetText(wxEmptyString);
         text = wxEmptyString;
 #endif
         int len = strlen(buf);
         text = wxEmptyString;
 #endif
         int len = strlen(buf);
@@ -678,12 +674,17 @@ sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
           char* defn = reinterpret_cast<char *>(lParam);
           AutoCompleteCancel();
           pt.y += vs.lineHeight;
           char* defn = reinterpret_cast<char *>(lParam);
           AutoCompleteCancel();
           pt.y += vs.lineHeight;
+          int ctStyle = ct.UseStyleCallTip() ? STYLE_CALLTIP : STYLE_DEFAULT;
+          if (ct.UseStyleCallTip())
+          {
+              ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back);
+          }
           PRectangle rc = ct.CallTipStart(currentPos, pt,
                                           defn,
           PRectangle rc = ct.CallTipStart(currentPos, pt,
                                           defn,
-                                          vs.styles[STYLE_DEFAULT].fontName,
-                                          vs.styles[STYLE_DEFAULT].sizeZoomed,
+                                          vs.styles[ctStyle].fontName,
+                                          vs.styles[ctStyle].sizeZoomed,
                                           CodePage(),
                                           CodePage(),
-                                          vs.styles[STYLE_DEFAULT].characterSet,
+                                          vs.styles[ctStyle].characterSet,
                                           wMain);
           // If the call-tip window would be out of the client
           // space, adjust so it displays above the text.
                                           wMain);
           // If the call-tip window would be out of the client
           // space, adjust so it displays above the text.