Formatting
This commit is contained in:
@@ -129,7 +129,7 @@ void AutoExpandingTreeView::mousePressEvent(QMouseEvent *event) {
|
||||
|
||||
QTreeView::mousePressEvent(event);
|
||||
|
||||
//enqueue to playlist with middleClick
|
||||
// enqueue to playlist with middleClick
|
||||
if (event->button() == Qt::MiddleButton) {
|
||||
QMimeData *q_mimedata = model()->mimeData(selectedIndexes());
|
||||
if (MimeData *mimedata = qobject_cast<MimeData*>(q_mimedata)) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "clickablelabel.h"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef CLICKABLELABEL_H
|
||||
#define CLICKABLELABEL_H
|
||||
|
||||
@@ -43,9 +43,9 @@ namespace {
|
||||
constexpr int TabSize_LargeSidebarMinWidth = 70;
|
||||
} // namespace
|
||||
|
||||
FancyTabBar::FancyTabBar(QWidget *parent) :
|
||||
QTabBar(parent),
|
||||
mouseHoverTabIndex(-1) {
|
||||
FancyTabBar::FancyTabBar(QWidget *parent)
|
||||
: QTabBar(parent),
|
||||
mouseHoverTabIndex(-1) {
|
||||
|
||||
setMouseTracking(true);
|
||||
|
||||
@@ -180,7 +180,7 @@ void FancyTabBar::paintEvent(QPaintEvent *pe) {
|
||||
QLinearGradient grad(selectionRect.topLeft(), selectionRect.topRight());
|
||||
grad.setColorAt(0, QColor(255, 255, 255, 140));
|
||||
grad.setColorAt(1, QColor(255, 255, 255, 210));
|
||||
p.fillRect(selectionRect.adjusted(0,0,0,-1), grad);
|
||||
p.fillRect(selectionRect.adjusted(0, 0, 0, -1), grad);
|
||||
p.restore();
|
||||
|
||||
// shadow lines
|
||||
|
||||
@@ -91,7 +91,7 @@ void FancyTabWidget::LoadSettings(const QString &settings_group) {
|
||||
|
||||
Settings s;
|
||||
s.beginGroup(settings_group);
|
||||
QMultiMap <int, FancyTabData*> tabs;
|
||||
QMultiMap<int, FancyTabData*> tabs;
|
||||
for (FancyTabData *tab : std::as_const(tabs_)) {
|
||||
int idx = s.value(u"tab_"_s + tab->name(), tab->index()).toInt();
|
||||
while (tabs.contains(idx)) { ++idx; }
|
||||
|
||||
@@ -32,7 +32,7 @@ ForceScrollPerPixel::ForceScrollPerPixel(QAbstractItemView *item_view, QObject *
|
||||
bool ForceScrollPerPixel::eventFilter(QObject *object, QEvent *event) {
|
||||
|
||||
if (object == item_view_ && event->type() != QEvent::Destroy && event->type() != QEvent::WinIdChange) {
|
||||
//event->type() != QEvent::AccessibilityPrepare)
|
||||
// event->type() != QEvent::AccessibilityPrepare)
|
||||
item_view_->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
item_view_->verticalScrollBar()->setSingleStep(20);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ QModelIndex GroupedIconView::indexAt(const QPoint &p) const {
|
||||
const QPoint viewport_p = p + QPoint(horizontalOffset(), verticalOffset());
|
||||
|
||||
const int count = static_cast<int>(visual_rects_.count());
|
||||
for (int i = 0; i<count; ++i) {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
if (visual_rects_[i].contains(viewport_p)) {
|
||||
return model()->index(i, 0);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ void GroupedIconView::paintEvent(QPaintEvent *e) {
|
||||
const QItemSelectionModel *selections = selectionModel();
|
||||
const bool focus = (hasFocus() || viewport()->hasFocus()) && current.isValid();
|
||||
const QStyle::State opt_state = option.state;
|
||||
const bool enabled = (opt_state & QStyle::State_Enabled) != 0;
|
||||
const bool enabled = (opt_state &QStyle::State_Enabled) != 0;
|
||||
|
||||
int maxSize = (flow() == TopToBottom) ? viewport()->size().width() - 2 * spacing() : viewport()->size().height() - 2 * spacing();
|
||||
|
||||
@@ -381,10 +381,10 @@ QModelIndex GroupedIconView::moveCursor(CursorAction action, const Qt::KeyboardM
|
||||
switch (action) {
|
||||
case MoveUp: ret = IndexAboveOrBelow(ret, -1); break;
|
||||
case MovePrevious:
|
||||
case MoveLeft: ret --; break;
|
||||
case MoveLeft: ret--; break;
|
||||
case MoveDown: ret = IndexAboveOrBelow(ret, +1); break;
|
||||
case MoveNext:
|
||||
case MoveRight: ret ++; break;
|
||||
case MoveRight: ret++; break;
|
||||
case MovePageUp:
|
||||
case MoveHome: ret = 0; break;
|
||||
case MovePageDown:
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "loginstatewidget.h"
|
||||
#include "ui_loginstatewidget.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Strawberry. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef LOGINSTATEWIDGET_H
|
||||
#define LOGINSTATEWIDGET_H
|
||||
|
||||
@@ -497,7 +497,7 @@ void PlayingWidget::FadePreviousTrack(const qreal value) {
|
||||
|
||||
void PlayingWidget::resizeEvent(QResizeEvent *e) {
|
||||
|
||||
//if (visible_ && e->oldSize() != e->size()) {
|
||||
// if (visible_ && e->oldSize() != e->size()) {
|
||||
if (e->oldSize() != e->size()) {
|
||||
if (mode_ == Mode::LargeSongDetails) {
|
||||
UpdateHeight();
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
prettyslider.cpp
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QSlider>
|
||||
#include <QStyle>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
prettyslider.h
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef PRETTYSLIDER_H
|
||||
#define PRETTYSLIDER_H
|
||||
|
||||
@@ -44,8 +44,8 @@ void RenameTabLineEdit::focusOutEvent(QFocusEvent *e) {
|
||||
|
||||
Q_UNUSED(e);
|
||||
|
||||
//if the user hasn't explicitly accepted, discard the value
|
||||
// if the user hasn't explicitly accepted, discard the value
|
||||
Q_EMIT EditingCanceled();
|
||||
//we don't call the default event since it will trigger editingFished()
|
||||
// we don't call the default event since it will trigger editingFished()
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ THE SOFTWARE.
|
||||
#include "searchfield.h"
|
||||
|
||||
SearchFieldPrivate::SearchFieldPrivate(SearchField *searchField, QLineEdit *lineedit, QPushButton *clearbutton)
|
||||
: QObject(searchField), lineedit_(lineedit), clearbutton_(clearbutton) {}
|
||||
: QObject(searchField), lineedit_(lineedit), clearbutton_(clearbutton) {}
|
||||
|
||||
int SearchFieldPrivate::lineEditFrameWidth() const {
|
||||
return lineedit_->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
sliderslider.cpp
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QSlider>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
sliderslider.h
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef SLIDERSLIDER_H
|
||||
#define SLIDERSLIDER_H
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
volumeslider.cpp
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QSlider>
|
||||
#include <QHash>
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/***************************************************************************
|
||||
volumeslider.h
|
||||
-------------------
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
begin : Dec 15 2003
|
||||
copyright : (C) 2003 by Mark Kretschmann
|
||||
email : markey@web.de
|
||||
copyright : (C) 2005 by Gábor Lehel
|
||||
email : illissius@gmail.com
|
||||
copyright : (C) 2018-2023 by Jonas Kvinge
|
||||
email : jonas@jkvinge.net
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef VOLUMESLIDER_H
|
||||
#define VOLUMESLIDER_H
|
||||
|
||||
Reference in New Issue
Block a user