Correct mistakes, rename left_arrow to left_side, make lowercase, change namespace to Olive
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/cursors">
|
||||
<file>Cursor_Left_Arrow.png</file>
|
||||
<file>Cursor_Right_Arrow.png</file>
|
||||
<file>left_side.png</file>
|
||||
<file>right_side.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
+8
-8
@@ -5,18 +5,18 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
QCursor OLIVE_CURSORS::left_arrow;
|
||||
QCursor OLIVE_CURSORS::right_arrow;
|
||||
QCursor Olive::left_side;
|
||||
QCursor Olive::right_side;
|
||||
|
||||
QCursor load_cursor(QString file, const int hotX, const int hotY, const bool right_aligend){
|
||||
int hotoutX;
|
||||
QCursor load_cursor(QString file, const int hotX, const int hotY, const bool right_aligned){
|
||||
int hotX_out;
|
||||
QPixmap temp = QPixmap(file);
|
||||
right_aligend? hotoutX = temp.width() : hotoutX = hotX;
|
||||
return QCursor(temp,hotoutX,hotY);
|
||||
right_aligned? hotX_out = temp.width() : hotX_out = hotX;
|
||||
return QCursor(temp,hotX_out,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);
|
||||
Olive::left_side = load_cursor(":/cursors/left_side.png", 0,-1, false);
|
||||
Olive::right_side = load_cursor(":/cursors/right_side.png", 0,-1, true);
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
|
||||
void initCustomCursors();
|
||||
|
||||
namespace OLIVE_CURSORS{
|
||||
extern QCursor left_arrow;
|
||||
extern QCursor right_arrow;
|
||||
namespace Olive{
|
||||
extern QCursor left_side;
|
||||
extern QCursor right_side;
|
||||
}
|
||||
|
||||
#endif // CURSORS_H
|
||||
|
||||
@@ -2070,9 +2070,9 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
}*/
|
||||
if (found) {
|
||||
if (right_arrow_cursor && !panel_timeline->trim_in_point){
|
||||
setCursor(OLIVE_CURSORS::right_arrow);
|
||||
setCursor(Olive::right_side);
|
||||
}else if (left_arrow_cursor && panel_timeline->trim_in_point){
|
||||
setCursor(OLIVE_CURSORS::left_arrow);
|
||||
setCursor(Olive::left_side);
|
||||
}else
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user