macOS fixes
This commit is contained in:
committed by
Craig Drummond
parent
0d3d931a31
commit
0963e25642
@@ -578,7 +578,9 @@ void MainWindow::init()
|
||||
bool showMenubar = Utils::Gnome!=Utils::currentDe() && Utils::Ubuntu_Gnome!=Utils::currentDe();
|
||||
#endif
|
||||
if (showMenubar) {
|
||||
#ifndef Q_OS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
menuButton->setVisible(false);
|
||||
#else
|
||||
showMenubarAction = ActionCollection::get()->createAction("showmenubar", tr("Show Menubar"));
|
||||
showMenubarAction->setShortcut(Qt::ControlModifier+Qt::Key_M);
|
||||
showMenubarAction->setCheckable(true);
|
||||
@@ -609,10 +611,12 @@ void MainWindow::init()
|
||||
menuBar()->addMenu(menu);
|
||||
if (Utils::KDE!=Utils::currentDe()) {
|
||||
menu=new QMenu(tr("&View"), this);
|
||||
#ifndef Q_OS_MAC
|
||||
if (showMenubarAction) {
|
||||
addMenuAction(menu, showMenubarAction);
|
||||
menu->addSeparator();
|
||||
}
|
||||
#endif
|
||||
addMenuAction(menu, expandInterfaceAction);
|
||||
addMenuAction(menu, fullScreenAction);
|
||||
//addMenuAction(menu, songInfoAction);
|
||||
@@ -629,9 +633,11 @@ void MainWindow::init()
|
||||
menuBar()->addMenu(menu);
|
||||
if (Utils::KDE==Utils::currentDe()) {
|
||||
menu=new QMenu(tr("&Settings"), this);
|
||||
#ifndef Q_OS_MAC
|
||||
if (showMenubarAction) {
|
||||
addMenuAction(menu, showMenubarAction);
|
||||
}
|
||||
#endif
|
||||
addMenuAction(menu, expandInterfaceAction);
|
||||
addMenuAction(menu, fullScreenAction);
|
||||
//addMenuAction(menu, songInfoAction);
|
||||
@@ -1845,7 +1851,7 @@ void MainWindow::updateStatus(MPDStatus * const status)
|
||||
consumePlayQueueAction->setChecked(status->consume());
|
||||
updateNextTrack(status->nextSongId());
|
||||
|
||||
if (status->timeElapsed()<172800 && (!currentIsStream() || (status->timeTotal()>0 && status->timeElapsed()<=status->timeTotal()))) {
|
||||
if (status->timeElapsed()<64800 && (!currentIsStream() || (status->timeTotal()>0 && status->timeElapsed()<=status->timeTotal()))) {
|
||||
if (status->state() == MPDState_Stopped || status->state() == MPDState_Inactive) {
|
||||
nowPlaying->setRange(0, 0);
|
||||
} else {
|
||||
|
||||
@@ -92,6 +92,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent)
|
||||
addPage(QLatin1String("custom"), custom, tr("Custom Actions"), Icon(QStringList() << "fork" << "gtk-execute"), tr("Custom Actions"));
|
||||
#ifdef Q_OS_MAC
|
||||
setCaption(tr("Cantata Preferences"));
|
||||
setMinimumWidth(800);
|
||||
#else
|
||||
setCaption(tr("Configure"));
|
||||
#endif
|
||||
|
||||
@@ -76,7 +76,11 @@ public:
|
||||
virtual void cancel()=0;
|
||||
|
||||
public Q_SLOTS:
|
||||
#ifdef __APPLE__
|
||||
void slotButtonClicked(int button);
|
||||
#else
|
||||
void slotButtonClicked(int button) override;
|
||||
#endif
|
||||
|
||||
private Q_SLOTS:
|
||||
void activatePage();
|
||||
@@ -85,10 +89,10 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
#ifdef __APPLE__
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void showEvent(QShowEvent *e);
|
||||
void hideEvent(QHideEvent *e);
|
||||
void closeEvent(QCloseEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void closeEvent(QCloseEvent *e) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
@@ -136,8 +136,8 @@ public:
|
||||
void resize(const QSize &sz);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
virtual void hideEvent(QHideEvent *e);
|
||||
virtual void closeEvent(QCloseEvent *e);
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void closeEvent(QCloseEvent *e) override;
|
||||
#endif
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "support/squeezedtextlabel.h"
|
||||
#include "support/utils.h"
|
||||
#include "support/icon.h"
|
||||
#include "support/proxystyle.h"
|
||||
#include "gui/stdactions.h"
|
||||
#include "toolbutton.h"
|
||||
#include "groupedview.h"
|
||||
@@ -47,6 +48,7 @@ TitleWidget::TitleWidget(QWidget *p)
|
||||
, pressed(false)
|
||||
, controls(nullptr)
|
||||
{
|
||||
setProperty(ProxyStyle::constModifyFrameProp, ProxyStyle::VF_Side|ProxyStyle::VF_Top);
|
||||
QHBoxLayout *layout=new QHBoxLayout(this);
|
||||
QVBoxLayout *textLayout=new QVBoxLayout(nullptr);
|
||||
image=new QLabel(this);
|
||||
|
||||
Reference in New Issue
Block a user