Skip to content

Commit

Permalink
Merge pull request libretro#7925 from CozmoP/sync
Browse files Browse the repository at this point in the history
Qt: Detailed file browser table and other changes.
  • Loading branch information
inactive123 authored Jan 16, 2019
2 parents c05be12 + 8adef3b commit fd17970
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 138 deletions.
4 changes: 4 additions & 0 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -6854,6 +6854,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_LOG,
"Log"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT,
"%1 items"
)
#ifdef HAVE_QT
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED,
Expand Down
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_PACK_DOWNLOADED_SUCCESSFULLY,
MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_PLAYLIST_THUMBNAIL_PROGRESS,
MENU_ENUM_LABEL_VALUE_QT_CORE_OPTIONS,
MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT,

MENU_LABEL(MIDI_INPUT),
MENU_LABEL(MIDI_OUTPUT),
Expand Down
5 changes: 1 addition & 4 deletions ui/drivers/qt/filedropwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
#endif

FileDropWidget::FileDropWidget(QWidget *parent) :
QWidget(parent)
QStackedWidget(parent)
{
setAcceptDrops(true);
}
Expand Down Expand Up @@ -106,9 +106,6 @@ void MainWindow::onFileDropWidgetContextMenuRequested(const QPoint &pos)
bool allPlaylist = currentPlaylistIsAll();
bool actionsAdded = false;

if (m_browserAndPlaylistTabWidget->tabText(m_browserAndPlaylistTabWidget->currentIndex()) != msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS))
return;

menu.reset(new QMenu(this));

if (!specialPlaylist)
Expand Down
4 changes: 2 additions & 2 deletions ui/drivers/qt/filedropwidget.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef FILEDROPWIDGET_H
#define FILEDROPWIDGET_H

#include <QWidget>
#include <QStackedWidget>

class QDragEnterEvent;
class QDropEvent;
class QKeyEvent;
class QPaintEvent;

class FileDropWidget : public QWidget
class FileDropWidget : public QStackedWidget
{
Q_OBJECT
public:
Expand Down
15 changes: 14 additions & 1 deletion ui/drivers/qt/ui_qt_themes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ static const QString qt_theme_default_stylesheet = QStringLiteral(R"(
background-color:#d4d4d4;
border:3px solid %1;
}
QFrame#playlistWidget, QFrame#browserWidget, QFrame#logWidget {
padding: 8px;
}
ListWidget {
icon-size: 32px;
}
)");

static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
Expand All @@ -24,13 +30,17 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
background-color:rgb(53,53,53);
selection-background-color:%1;
}
QWidget#playlistWidget, QWidget#browserWidget, QWidget#tableWidget, QWidget#logWidget {
QFrame#playlistWidget, QFrame#browserWidget, QStackedWidget#centralWidget, QFrame#logWidget {
padding: 8px;
background-color:rgb(66,66,66);
border-top:1px solid rgba(175,175,175,50%);
border-left:1px solid rgba(125,125,125,50%);
border-right:1px solid rgba(125,125,125,50%);
border-bottom:1px solid rgba(25,25,25,75%);
}
ListWidget {
icon-size: 32px;
}
QTextEdit, LogTextEdit {
background-color:rgb(25,25,25);
}
Expand Down Expand Up @@ -436,4 +446,7 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
GridItem {
qproperty-thumbnailvalign: "center";
}
QLabel#itemsCountLabel {
padding-left: 5px;
}
)");
Loading

0 comments on commit fd17970

Please sign in to comment.