Add ability to load custom cursors. Add custom cursor to left / right

clip position editing.

Revert white space edits in timelinewidget.
This commit is contained in:
alexmitchell
2019-02-05 16:08:18 +10:30
parent 749c4d8ff8
commit 3fe8660c5e
8 changed files with 371 additions and 314 deletions
+22
View File
@@ -0,0 +1,22 @@
#include "cursors.h"
#include <QPixmap>
#include <QCursor>
#include <QDebug>
QCursor OLIVE_CURSORS::left_arrow;
QCursor OLIVE_CURSORS::right_arrow;
QCursor load_cursor(QString file, const int hotX, const int hotY, const bool right_aligend){
int hotoutX;
QPixmap temp = QPixmap(file);
right_aligend? hotoutX = temp.width() : hotoutX = hotX;
return QCursor(temp,hotoutX,hotY);
}
void initCustomCursors(){
qInfo() << "Loading Custom Cursors";
OLIVE_CURSORS::left_arrow = load_cursor(":/cursors/Cursor_Left_Arrow.png", 0,-1, false);
OLIVE_CURSORS::right_arrow = load_cursor(":/cursors/Cursor_Right_Arrow.png", 0,-1, true);
}