branches/KDE/4.5/kdelibs/kate

Dominik Haumann dhdev at gmx.de
Sun Jul 4 21:22:31 UTC 2010


SVN commit 1145993 by dhaumann:

backport SVN commit 1145806 by cullmann:

cullmann:
    define z depths for the most common ranges in kate part, as discussed on kwrite-devel some weeks ago
    implementation should work, too, now
    
CCMAIL: kwrite-devel at kde.org
CCMAIL: kdevelop-devel at barney.cs.uni-potsdam.de


 M  +6 -2      search/katesearchbar.cpp  
 M  +3 -0      view/kateview.cpp  
 M  +2 -1      view/kateviewhelpers.cpp  
 M  +5 -0      view/kateviewinternal.cpp  


--- branches/KDE/4.5/kdelibs/kate/search/katesearchbar.cpp #1145992:1145993
@@ -264,16 +264,20 @@
 void KateSearchBar::highlightMatch(const Range & range) {
     KTextEditor::MovingRange* const highlight = m_view->doc()->newMovingRange(range, Kate::TextRange::DoNotExpand);
     highlight->setView(m_view); // show only in this view
+    highlight->setAttributeOnlyForViews(true);
+    // use z depth defined in moving ranges interface
+    highlight->setZDepth (-10000.0);
     highlight->setAttribute(highlightMatchAttribute);
-    highlight->setAttributeOnlyForViews(true);
     m_hlRanges.append(highlight);
 }
 
 void KateSearchBar::highlightReplacement(const Range & range) {
     KTextEditor::MovingRange* const highlight = m_view->doc()->newMovingRange(range, Kate::TextRange::DoNotExpand);
     highlight->setView(m_view); // show only in this view
+    highlight->setAttributeOnlyForViews(true);
+    // use z depth defined in moving ranges interface
+    highlight->setZDepth (-10000.0);
     highlight->setAttribute(highlightReplacementAttribute);
-    highlight->setAttributeOnlyForViews(true);
     m_hlRanges.append(highlight);
 }
 
--- branches/KDE/4.5/kdelibs/kate/view/kateview.cpp #1145992:1145993
@@ -140,6 +140,9 @@
   // selection if for this view only and will invalidate if becoming empty
   m_selection.setView (this);
 
+  // use z depth defined in moving ranges interface
+  m_selection.setZDepth (-100000.0);
+
   KateGlobal::self()->registerView( this );
 
   KTextEditor::ViewBarContainer *viewBarContainer=qobject_cast<KTextEditor::ViewBarContainer*>( KateGlobal::self()->container() );
--- branches/KDE/4.5/kdelibs/kate/view/kateviewhelpers.cpp #1145992:1145993
@@ -1334,7 +1334,8 @@
     KTextEditor::Attribute::Ptr attr(new KTextEditor::Attribute());
     attr->setBackground(foldingColor(0, m_currentBlockLine, false));
     m_foldingRange->setView (m_view);
-    m_foldingRange->setZDepth (1000.0);
+    // use z depth defined in moving ranges interface
+    m_foldingRange->setZDepth (-100.0);
     m_foldingRange->setAttribute(attr);
   }
 }
--- branches/KDE/4.5/kdelibs/kate/view/kateviewinternal.cpp #1145992:1145993
@@ -120,6 +120,11 @@
   m_bmStart->setAttributeOnlyForViews (true);
   m_bmEnd->setAttributeOnlyForViews (true);
 
+  // use z depth defined in moving ranges interface
+  m_bm->setZDepth (-1000.0);
+  m_bmStart->setZDepth (-1000.0);
+  m_bmEnd->setZDepth (-1000.0);
+
   // update mark attributes
   updateBracketMarkAttributes();
 




More information about the KDevelop-devel mailing list