Use the window text color for the places pane.

ubuntu/cosmic
Simon Quigley 7 years ago
parent b0dea37e48
commit 07036c23c2

1
debian/changelog vendored

@ -3,6 +3,7 @@ libfm-qt (0.13.1-5ubuntu1) UNRELEASED; urgency=medium
* Update Vcs-* and maintainer for maintaining by Lubuntu.
* Add LXQt Archiver integration.
* Fix failure to open smb:// caused by incorrect file info handling.
* Use the window text color for the places pane.
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 13 Jul 2018 23:59:59 -0500

@ -0,0 +1,52 @@
Description: Use window text color for places view
Author: tsujan <tsujan2000@gmail.com>
Origin: upstream
Bug: https://github.com/lxqt/pcmanfm-qt/issues/696
Applied-Upstream: commit:87df010
Last-Update: 2018-07-14
--- a/src/folderitemdelegate.cpp
+++ b/src/folderitemdelegate.cpp
@@ -361,7 +361,8 @@ QWidget* FolderItemDelegate::createEdito
// ensure that its background isn't transparent (on the side-pane)
QWidget* editor = QStyledItemDelegate::createEditor(parent, option, index);
QPalette p = editor->palette();
- p.setColor(QPalette::Base, QApplication::palette().color(QPalette::Base));
+ p.setColor(QPalette::Text, qApp->palette().text().color());
+ p.setColor(QPalette::Base, qApp->palette().color(QPalette::Base));
editor->setPalette(p);
return editor;
}
--- a/src/placesview.cpp
+++ b/src/placesview.cpp
@@ -131,13 +131,6 @@ PlacesView::PlacesView(QWidget* parent):
setHeaderHidden(true);
setIndentation(12);
- /* merge with the surroundings */
- setFrameShape(QFrame::NoFrame);
- QPalette p = palette();
- p.setColor(QPalette::Base, QColor(Qt::transparent));
- setPalette(p);
- viewport()->setAutoFillBackground(false);
-
connect(this, &QTreeView::clicked, this, &PlacesView::onClicked);
connect(this, &QTreeView::pressed, this, &PlacesView::onPressed);
--- a/src/sidepane.cpp
+++ b/src/sidepane.cpp
@@ -158,6 +158,15 @@ void SidePane::setMode(Mode mode) {
switch(mode) {
case ModePlaces: {
PlacesView* placesView = new Fm::PlacesView(this);
+
+ // visually merge it with its surroundings
+ placesView->setFrameShape(QFrame::NoFrame);
+ QPalette p = placesView->palette();
+ p.setColor(QPalette::Base, QColor(Qt::transparent));
+ p.setColor(QPalette::Text, p.color(QPalette::WindowText));
+ placesView->setPalette(p);
+ placesView->viewport()->setAutoFillBackground(false);
+
view_ = placesView;
placesView->restoreHiddenItems(restorableHiddenPlaces_);
placesView->setIconSize(iconSize_);

@ -1,3 +1,4 @@
add-lxqt-archiver-integration.patch
fix-incorrect-file-info-handling-1.patch
fix-incorrect-file-info-handling-2.patch
fix-places-font-color.patch

Loading…
Cancel
Save