width slider terminado...
@ -48,6 +48,7 @@ HEADERS += comic.h \
|
|||||||
page_label_widget.h \
|
page_label_widget.h \
|
||||||
goto_flow_toolbar.h \
|
goto_flow_toolbar.h \
|
||||||
goto_flow_decorationbar.h \
|
goto_flow_decorationbar.h \
|
||||||
|
width_slider.h \
|
||||||
../common/pictureflow.h \
|
../common/pictureflow.h \
|
||||||
../common/custom_widgets.h \
|
../common/custom_widgets.h \
|
||||||
../common/check_new_version.h \
|
../common/check_new_version.h \
|
||||||
@ -75,6 +76,7 @@ SOURCES += comic.cpp \
|
|||||||
page_label_widget.cpp \
|
page_label_widget.cpp \
|
||||||
goto_flow_toolbar.cpp \
|
goto_flow_toolbar.cpp \
|
||||||
goto_flow_decorationbar.cpp \
|
goto_flow_decorationbar.cpp \
|
||||||
|
width_slider.cpp \
|
||||||
../common/pictureflow.cpp \
|
../common/pictureflow.cpp \
|
||||||
../common/custom_widgets.cpp \
|
../common/custom_widgets.cpp \
|
||||||
../common/check_new_version.cpp \
|
../common/check_new_version.cpp \
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "comic.h"
|
#include "comic.h"
|
||||||
#include "bookmarks_dialog.h"
|
#include "bookmarks_dialog.h"
|
||||||
#include "shortcuts_dialog.h"
|
#include "shortcuts_dialog.h"
|
||||||
|
#include "width_slider.h"
|
||||||
|
|
||||||
MainWindowViewer::MainWindowViewer()
|
MainWindowViewer::MainWindowViewer()
|
||||||
:QMainWindow(),fullscreen(false),toolbars(true),alwaysOnTop(false),currentDirectory("."),currentDirectoryImgDest(".")
|
:QMainWindow(),fullscreen(false),toolbars(true),alwaysOnTop(false),currentDirectory("."),currentDirectoryImgDest(".")
|
||||||
@ -322,13 +322,17 @@ void MainWindowViewer::createToolBars()
|
|||||||
|
|
||||||
//comicToolBar->addAction(adjustWidth);
|
//comicToolBar->addAction(adjustWidth);
|
||||||
QMenu * menu = new QMenu();
|
QMenu * menu = new QMenu();
|
||||||
|
sliderAction = new YACReaderSliderAction(this);
|
||||||
menu->setAutoFillBackground(false);
|
menu->setAutoFillBackground(false);
|
||||||
menu->setStyleSheet(" QMenu {background:transparent; border: 0px;padding: 0px; }"
|
menu->setStyleSheet(" QMenu {background:transparent; border: 0px;padding: 0px; }"
|
||||||
);
|
);
|
||||||
menu->addAction(new YACReaderSliderAction(this));
|
menu->addAction(sliderAction);
|
||||||
QToolButton * tb2 = new QToolButton();
|
QToolButton * tb2 = new QToolButton();
|
||||||
tb2->addAction(adjustWidth);
|
tb2->addAction(adjustWidth);
|
||||||
tb2->setMenu(menu);
|
tb2->setMenu(menu);
|
||||||
|
|
||||||
|
connect(sliderAction,SIGNAL(fitToWidthRatioChanged(float)),viewer,SLOT(updateFitToWidthRatio(float)));
|
||||||
|
|
||||||
//tb2->addAction();
|
//tb2->addAction();
|
||||||
tb2->setPopupMode(QToolButton::MenuButtonPopup);
|
tb2->setPopupMode(QToolButton::MenuButtonPopup);
|
||||||
tb2->setDefaultAction(adjustWidth);
|
tb2->setDefaultAction(adjustWidth);
|
||||||
|
@ -15,7 +15,7 @@ class OptionsDialog;
|
|||||||
class HelpAboutDialog;
|
class HelpAboutDialog;
|
||||||
class HttpVersionChecker;
|
class HttpVersionChecker;
|
||||||
class ShortcutsDialog;
|
class ShortcutsDialog;
|
||||||
|
class YACReaderSliderAction;
|
||||||
|
|
||||||
class MainWindowViewer : public QMainWindow
|
class MainWindowViewer : public QMainWindow
|
||||||
{
|
{
|
||||||
@ -91,6 +91,7 @@ class ShortcutsDialog;
|
|||||||
QAction *showDictionaryAction;
|
QAction *showDictionaryAction;
|
||||||
QAction *alwaysOnTopAction;
|
QAction *alwaysOnTopAction;
|
||||||
QAction *adjustToFullSizeAction;
|
QAction *adjustToFullSizeAction;
|
||||||
|
YACReaderSliderAction * sliderAction;
|
||||||
|
|
||||||
HttpVersionChecker * versionChecker;
|
HttpVersionChecker * versionChecker;
|
||||||
QString previousComicPath;
|
QString previousComicPath;
|
||||||
|
@ -1206,66 +1206,3 @@ YACReaderFlowConfigWidget::YACReaderFlowConfigWidget(QWidget * parent )
|
|||||||
|
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
YACReaderSliderAction::YACReaderSliderAction (QWidget * parent)
|
|
||||||
:QWidgetAction (0) {
|
|
||||||
|
|
||||||
//QWidget* pWidget = new QWidget (0);
|
|
||||||
|
|
||||||
//QLabel* imgLabel = new QLabel(pWidget);
|
|
||||||
//QPixmap p(":/images/numPagesLabel.png");
|
|
||||||
//imgLabel->resize(p.size());
|
|
||||||
//imgLabel->setPixmap(p);
|
|
||||||
|
|
||||||
//QLabel * textLabel = new QLabel(pWidget);
|
|
||||||
//textLabel->setAlignment(Qt::AlignVCenter|Qt::AlignHCenter);
|
|
||||||
//textLabel->setStyleSheet("QLabel { color : white; }");
|
|
||||||
//textLabel->setText("hola");
|
|
||||||
////informationLabel->setAutoFillBackground(true);
|
|
||||||
////textLabel->setFont(QFont("courier new bold", 12));
|
|
||||||
////textLabel->resize(100,25);
|
|
||||||
|
|
||||||
//textLabel->setGeometry(imgLabel->geometry());
|
|
||||||
|
|
||||||
//setDefaultWidget(pWidget);
|
|
||||||
|
|
||||||
QWidget* pWidget = new QWidget (NULL);
|
|
||||||
QHBoxLayout* pLayout = new QHBoxLayout();
|
|
||||||
QLabel * pLabel = new QLabel ("100%");
|
|
||||||
pLabel->setStyleSheet("QLabel { color : white; }");
|
|
||||||
pLayout->addWidget (pLabel);
|
|
||||||
QSlider * slider = new QSlider(NULL);
|
|
||||||
slider->setOrientation(Qt::Horizontal);
|
|
||||||
pLayout->addWidget (slider);
|
|
||||||
//"background-image: url(:/images/sliderGround.png); width: 100%; height:100%; background-repeat: none; border: none; padding: 0px; color: white;"
|
|
||||||
//"QSlider::sub-page:horizontal {background-image: url(:/images/sliderSubPage.png); background-repeat:repeat-x;}"
|
|
||||||
QString sliderCSS = //"QSlider {background-image: url(:/images/sliderGround.png); width: 100%; height:100%; background-repeat: none; border: none; padding: 0px;} "
|
|
||||||
|
|
||||||
"QSlider::sub-page:horizontal {background-image: url(:/images/sliderSubPage.png); border: 0px; margin-left: 18px;}"
|
|
||||||
"QSlider::add-page:horizontal {background-image: url(:/images/sliderAddPage.png); border: 0px; margin-right: 18px;}"
|
|
||||||
"QSlider::handle:horizontal {image: url(:/images/sliderHandle.png); width: 100px;height:45px;padding:-20px; margin-left:-10px; margin-right:-10px; }"
|
|
||||||
"QSlider::groove:horizontal {border-image:url(:/images/sliderGround.png); border-left:-10px; border-right:-10px;}"
|
|
||||||
;
|
|
||||||
|
|
||||||
//"QSlider::handle {background-image: url(:/images/sliderHandle.png); border: 0px; width: 31px; height:45px; margin:0px; padding:0px;}"
|
|
||||||
slider->setStyleSheet(sliderCSS);
|
|
||||||
slider->setFixedSize(214,45);
|
|
||||||
|
|
||||||
QLabel* imgLabel = new QLabel(pWidget);
|
|
||||||
QPixmap p(":/images/sliderBackground.png");
|
|
||||||
imgLabel->resize(p.size());
|
|
||||||
imgLabel->setPixmap(p);
|
|
||||||
|
|
||||||
pLayout->setMargin(0);
|
|
||||||
pLayout->setSpacing(0);
|
|
||||||
|
|
||||||
pWidget->setLayout (pLayout);
|
|
||||||
pWidget->setAutoFillBackground(false);
|
|
||||||
|
|
||||||
//pWidget->setMinimumSize(250,45);
|
|
||||||
|
|
||||||
setDefaultWidget(pWidget);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -371,10 +371,6 @@ signals:
|
|||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class YACReaderSliderAction : public QWidgetAction {
|
|
||||||
public:
|
|
||||||
YACReaderSliderAction (QWidget * parent = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 955 B After Width: | Height: | Size: 951 B |
Before Width: | Height: | Size: 868 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 185 B |