diff --git a/Builds/MSVC/Installer/Product.wxs b/Builds/MSVC/Installer/Product.wxs
index 59da13c..2782a52 100644
--- a/Builds/MSVC/Installer/Product.wxs
+++ b/Builds/MSVC/Installer/Product.wxs
@@ -268,7 +268,11 @@
-
+
+
+
+
+
diff --git a/Builds/QtCreator/Fractorium/Fractorium.pro b/Builds/QtCreator/Fractorium/Fractorium.pro
index 5a62514..398a657 100644
--- a/Builds/QtCreator/Fractorium/Fractorium.pro
+++ b/Builds/QtCreator/Fractorium/Fractorium.pro
@@ -99,6 +99,7 @@ themes.files = $$ASSETS_DIR/dark_linux.qss
}
themes.files += $$ASSETS_DIR/lightdark.qss
+themes.files += $$ASSETS_DIR/uranium.qss
#message(THEMES INSTALL SOURCE: $$themes.files)
INSTALLS += themes
diff --git a/Data/uranium.qss b/Data/uranium.qss
new file mode 100644
index 0000000..a47a3d5
--- /dev/null
+++ b/Data/uranium.qss
@@ -0,0 +1,851 @@
+*
+{
+ font: 8.5pt "MS Shell Dlg 2";/*For some reason the font changes if you set any style. Set this to whatever font is the default on your system*/
+}
+
+QObject
+{
+ background-color: #706F77;
+ color: rgb(124, 232, 0);
+ alternate-background-color: #706F77;
+ selection-color: rgb(124, 232, 0);
+}
+
+QObject:disabled
+{
+ color: rgba(255, 255, 255, 40);
+}
+
+QStatusBar
+{
+ background-color: rgb(115, 133, 116);
+}
+
+/*This is needed to give the labels on the status bar some padding.*/
+QStatusBar QLabel { padding-left: 2px; padding-right: 2px; }
+
+Fractorium
+{
+ qproperty-VariationTreeColorNonZero: rgb(221, 255, 130);
+ qproperty-VariationTreeColorZero: rgb(124, 232, 0);
+ qproperty-VariationTreeBgColorNonZero: rgb(35, 36, 34);
+ qproperty-VariationTreeBgColorZero:#706F77;
+}
+
+/*==================================================================================================
+QTableView
+==================================================================================================*/
+
+/*For some reason, Qt does not draw table headers correctly, so the style must always be manually specified.*/
+QHeaderView::section::vertical:enabled
+{
+ width: 12px;
+ color: black;
+ background-color: rgb(176, 204, 177);
+ border: none;
+ padding: 0px;
+ padding-left: 4px;
+}
+
+QHeaderView::section::horizontal:enabled
+{
+ height: 18px;
+ color: black;
+ background-color: rgb(176, 204, 177);
+ border: none;
+ padding: 0px;
+ padding-left: 4px;
+}
+
+QHeaderView::section::vertical:disabled
+{
+ width: 12px;
+ color: rgb(35, 35, 35);
+ background-color: rgb(53, 53, 53);
+ border: none;
+ padding: 0px;
+ padding-left: 4px;
+}
+
+QHeaderView::section::horizontal:disabled
+{
+ height: 18px;
+ color:rgb(35, 35, 35);
+ background-color: rgb(53, 53, 53);
+ border: none;
+ padding: 0px;
+ padding-left: 4px;
+}
+
+QTableView
+{
+ border: 1px solid rgb(176, 204, 177);
+ gridline-color: rgb(176, 204, 177);
+ selection-background-color: rgb(115, 133, 116);
+}
+
+QTableView QTableCornerButton::section:enabled
+{
+ border: none;
+ background-color: rgb(176, 204, 177);
+}
+
+QTableView QTableCornerButton::section:disabled
+{
+ border: none;
+ background-color: rgb(53, 53, 53);
+}
+
+QTableView::indicator:disabled
+{
+ background-color: rgb(53, 53, 53);
+}
+
+QTableView:disabled
+{
+ color: rgb(35, 35, 35);
+ border: 1px solid rgb(53, 53, 53);
+ gridline-color: rgb(35, 35, 35);
+}
+
+QTableWidget
+{
+ border: 1px solid rgb(176, 204, 177);
+ selection-background-color: rgb(115, 133, 116);
+}
+
+QTableWidget::item:hover
+{
+ border: 0px none black;
+ color: rgb(221, 255, 130);
+ background-color: rgb(115, 133, 116);
+ outline: none;
+}
+
+QTableWidget::item:selected
+{
+ border: 0px none black;
+ color: rgb(221, 255, 130);
+ background-color: rgb(35, 36, 34);
+ outline: none;
+}
+
+/*==================================================================================================
+QScrollBar
+==================================================================================================*/
+
+QScrollBar::vertical
+{
+ background-color: rgb(115, 133, 116);
+ border: 0px solid rgb(115, 133, 116);
+ width: 15px;
+ margin: 22px 0 22px 0;
+}
+
+QScrollBar::handle::vertical
+{
+ background-color: rgb(176, 204, 177);
+ border-top: 1px solid rgb(115, 133, 116);
+ border-bottom: 1px solid rgb(115, 133, 116);
+ min-height: 20px;
+}
+
+QScrollBar::add-line::vertical
+{
+ border: 0px solid darkgray;
+ background-color: gray;
+ height: 22px;
+ subcontrol-position: bottom;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line::vertical
+{
+ border: 0px solid darkgray;
+ background-color: gray;
+ height: 22px;
+ subcontrol-position: top;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::up-arrow::vertical, QScrollBar::down-arrow::vertical
+{
+ border: 2px solid rgb(124, 232, 0);
+ width: 5px;
+ height: 12px;
+ background-color: gray;
+}
+
+QScrollBar::add-page::vertical,
+QScrollBar::sub-page::vertical,
+QScrollBar::add-page::horizontal,
+QScrollBar::sub-page::horizontal
+{
+ background-color: rgb(115, 133, 116);
+}
+
+QScrollBar::horizontal
+{
+ background-color: rgb(176, 204, 177);
+ border: 0px solid darkgray;
+ height: 15px;
+ margin: 0px 20px 0 20px;
+}
+
+QScrollBar::handle::horizontal
+{
+ background-color: rgb(176, 204, 177);
+ border-left: 1px solid rgb(115, 133, 116);
+ border-right: 1px solid rgb(115, 133, 116);
+ min-width: 20px;
+}
+
+QScrollBar::add-line::horizontal
+{
+ border: 0px solid darkgray;
+ background-color: gray;
+ width: 20px;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::sub-line::horizontal
+{
+ border: 0px solid darkgray;
+ background-color: gray;
+ width: 20px;
+ subcontrol-position: left;
+ subcontrol-origin: margin;
+}
+
+QScrollBar::left-arrow::horizontal,
+QScrollBar::right-arrow::horizontal
+{
+ border: 2px solid rgb(124, 232, 0);
+ width: 12px;
+ height: 5px;
+ background-color: gray;
+}
+
+/*==================================================================================================
+QMenu
+==================================================================================================*/
+
+QMenuBar
+{
+ background-color: rgb(115, 133, 116);
+}
+
+QMenuBar::item
+{
+ padding: 4px;
+ background-color: rgb(115, 133, 116);
+}
+
+QMenuBar::item:selected
+{
+ background-color: rgb(176, 204, 177);
+ color: black;
+}
+
+QMenu
+{
+ border: none;
+ margin: 0;
+ menu-scrollable: 0;
+}
+
+QMenu::icon
+{
+ margin: 5px;
+}
+
+QMenu::item
+{
+ padding: 5px 30px 5px 30px;
+}
+
+QMenu::item:enabled:selected
+{
+ background-color: rgb(176, 204, 177);
+ color: black;
+}
+
+QMenu::item:disabled
+{
+ color: #A0A0A0;
+}
+
+QMenu::separator
+{
+ height: 1px;
+ background-color: #A9A9A9;
+ margin: 0;
+}
+
+/*==================================================================================================
+Dock widget
+==================================================================================================*/
+
+QDockWidget::title
+{
+ text-align: center;
+ background-color: rgb(115, 133, 116);
+ border: 2px solid #706F77; /* fix to simulate margin between this :title and tabs */ /* same as main background color */
+ border-radius: 6px; /* bigger than normal due to previous border fix */
+ padding: 4px 0px; /* also needed because of previous border fix */
+}
+
+QDockWidget::float-button
+{
+ background-color: rgb(176, 204, 177);
+ border-radius: 3px;
+ subcontrol-origin: padding;
+ subcontrol-position: right center;
+}
+
+QDockWidget::float-button
+{
+ right: 4px;
+}
+
+QDockWidget::float-button:hover
+{
+ background-color: rgb(176, 204, 177);
+ border: 2px solid #706F77;
+}
+
+QDockWidget::float-button:pressed
+{
+ background-color: rgba(176, 204, 177,30);
+ border: 2px solid #706F77;
+}
+
+/*==================================================================================================
+QTabWidget
+==================================================================================================*/
+
+QTabWidget::pane
+{
+ background-color: transparent;
+ position: absolute;
+}
+QTabWidget::pane:top
+{
+ top: -1px;
+ border-top: 1px solid #4a4a4a;
+}
+
+QTabWidget::pane:bottom
+{
+ bottom: -1px;
+ border-bottom: 1px solid #4a4a4a;
+}
+
+QTabWidget::pane:left
+{
+ right: -1px;
+ border-right: 1px solid #4a4a4a;
+}
+
+QTabWidget::pane:right
+{
+ left: -1px;
+ border-left: 1px solid #4a4a4a;
+}
+
+QTabWidget::tab-bar:top,
+QTabWidget::tab-bar:bottom
+{
+ left: 5px;
+}
+
+QTabWidget::tab-bar:left,
+QTabWidget::tab-bar:right
+{
+ top: 5px;
+}
+
+/*==================================================================================================
+QTabBar
+==================================================================================================*/
+
+QTabBar
+{
+ qproperty-drawBase: 0; /* important */
+ background-color: transparent;
+}
+
+/* Workaround for QTabBars created from docked QDockWidgets which don't draw the border if not set and reseted as follows: */
+QTabBar
+{
+ border-top: 0px;
+ border-bottom: 1px solid #4a4a4a;
+}
+
+QDockWidget QTabBar
+{
+ border-color: transparent; /* set color for all QTabBars but ones created from QDockWidget */
+}
+
+QDialog QTabBar
+{
+ border-color: transparent; /* set color for QTabBars inside Preferences dialog */
+}
+/* end fix */
+
+QTabBar::tab
+{
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 4px 4px 4px 4px;
+ margin: 0px;
+}
+
+QDialog QTabBar::tab:top
+{
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 4px 4px 4px 4px;
+ min-width: 20ex;
+}
+
+QTabBar::tab:left,
+QTabBar::tab:right
+{
+ border-left-width: 0px;
+ border-right-width: 4px;
+ min-height: 9ex;
+}
+
+QTabBar::tab:top,
+QTabBar::tab:bottom
+{
+ border-top-width: 0px;
+ border-bottom-width: 4px;
+ min-width: 9ex;
+}
+
+QDialog QTabBar::tab:selected,
+QTabBar::tab:selected
+{
+ background-color: #706F77; /* same as tab content background color */
+ border-color: #4a4a4a;
+}
+
+QTabBar::tab:top:selected
+{
+ border-top: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgb(176, 204, 177), stop:1 rgb(115, 133, 116)); /* selection color */
+ border-bottom-color: #706F77; /* same as tab content background color */
+}
+
+QTabBar::tab:bottom:selected
+{
+ border-bottom: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgb(176, 204, 177), stop:1 rgb(115, 133, 116)); /* selection color */
+ border-right-color: #706F77; /* same as tab content background color */
+}
+
+QTabBar::tab:right:selected
+{
+ border-left: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgb(176, 204, 177), stop:1 rgb(115, 133, 116)); /* selection color */
+ border-right-color: #706F77; /* same as tab content background color */
+}
+
+QTabBar::tab:left:selected
+{
+ border-right: 3px solid qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, rgb(176, 204, 177), stop:1 rgb(115, 133, 116)); /* selection color */
+ border-left-color: #706F77; /* same as tab content background color */
+}
+
+QTabBar::tab:first:selected
+{
+ margin-left: 4px; /* the first selected tab has nothing to overlap with on the left */
+}
+
+QTabBar::tab:last:selected
+{
+ margin-right: 4px; /* the last selected tab has nothing to overlap with on the right */
+}
+
+QTabBar::tab:only-one
+{
+ margin: 0; /* if there is only one tab, we don't want overlapping margins */
+}
+
+/*==================================================================================================
+QToolBar
+==================================================================================================*/
+
+QToolBar
+{
+ padding: 0px;
+ border: 0px none gray;
+ background-color: rgb(115, 133, 116);
+}
+
+QToolBar > QToolButton
+{
+ margin: 1px;
+ padding: 1px;
+ border-radius: 3px;
+ color: rgb(124, 232, 0);
+ border: 1px solid rgb(115, 133, 116);
+ position: relative;
+ subcontrol-position: right;
+ subcontrol-origin: margin;
+ background-color: rgb(115, 133, 116);
+}
+
+QDialog > QToolBar > QToolButton
+{
+ width: 95px;
+ margin: 0px;
+ padding: 0px;
+ border-radius: 3px;
+ border: 1px solid rgb(115, 133, 116);
+}
+
+QDialog > QToolBar > QToolButton::menu-button
+{
+ left: -2px;
+ border-radius: 3px;
+ border: 1px solid rgb(115, 133, 116);
+}
+
+/* when QToolButton is checked: */
+QToolBar > QToolButton:checked
+{
+ color: black;
+ border: 1px solid rgb(150, 179, 190);
+ background-color: rgb(150, 179, 190);
+}
+
+QToolBar > QToolButton:checked:hover
+{
+ border: 1px solid rgb(124, 232, 0);
+ background-color: rgb(150, 179, 190);
+}
+
+QToolBar > QToolButton:hover
+{
+ border: 1px solid rgb(124, 232, 0);
+ background-color: rgb(115, 133, 116);
+}
+
+QToolBar > QToolButton:pressed
+{
+ background-color: rgba(0,0,0,40);
+}
+
+QToolBar > QToolButton:disabled
+{
+ background-color: rgba(0, 0, 0, 20);
+}
+
+/*==================================================================================================
+Remainder from the previous attempt at a stylesheet, dark_windows.qss
+==================================================================================================*/
+QPushButton
+{
+ margin: 1px;
+ padding: 4px;
+ color: black;
+ background-color: rgb(150, 179, 190);
+}
+
+QPushButton:pressed
+{
+ background-color: gray;
+}
+
+QPushButton:focus,
+QPushButton:hover,
+QPushButton:selected
+{
+ outline: none;
+ border: 1px solid rgb(124, 232, 0);
+ border-radius: 2px;
+}
+
+QPushButton:disabled
+{
+ color: #706F77;
+}
+
+QLineEdit, QTextEdit
+{
+ border: 1px solid rgb(150, 179, 190);
+ color: rgb(221, 255, 130);
+ background-color: rgb(115, 133, 116);
+ selection-color: rgb(124, 232, 0);
+ selection-background-color: rgb(150, 179, 190);
+}
+
+QSpinBox,
+QDoubleSpinBox
+{
+ padding-right: 0px;
+ selection-color: rgb(124, 232, 0);
+ selection-background-color: rgb(150, 179, 190);
+}
+
+QCheckBox
+{
+ spacing: 5px;
+}
+
+QCheckBox::indicator,
+QTableView::indicator,
+QGroupBox::indicator,
+QTreeView::indicator
+{
+ border-radius: 3px;
+}
+
+QCheckBox::indicator:enabled:unchecked,
+QTableView::indicator:enabled:unchecked,
+QGroupBox::indicator:enabled:unchecked,
+QTreeView::indicator:enabled:unchecked
+{
+ background-color: rgb(115, 133, 116);
+}
+
+QCheckBox::indicator:enabled:checked,
+QTableView::indicator:enabled:checked,
+QGroupBox::indicator:enabled:checked,
+QTreeView::indicator:enabled:checked
+{
+ background-color: rgb(124, 232, 0);
+}
+
+QCheckBox::indicator:disabled:unchecked,
+QTableView::indicator:disabled:unchecked,
+QGroupBox::indicator:disabled:unchecked,
+QTreeView::indicator:disabled:unchecked
+
+{
+ background-color: gray;
+ image: none;
+}
+
+QCheckBox::indicator:disabled:checked,
+QTableView::indicator:disabled:checked,
+QGroupBox::indicator:disabled:checked,
+QTreeView::indicator:disabled:checked
+{
+ background-color: gray;
+ image: none;
+}
+
+QRadioButton::indicator:checked
+{
+ background-color: rgb(176, 204, 177);
+ border: 2px solid rgb(115, 133, 116);
+ border-radius: 7px;
+ width: 8px;
+ height: 8px;
+ margin: 3px;
+ padding: 1px;
+}
+
+QRadioButton::indicator:checked:disabled
+{
+ background-color: rgb(115, 133, 116);
+}
+
+QRadioButton::indicator:unchecked
+{
+ border: 2px solid gray;
+ border-radius: 7px;
+ width: 8px;
+ height: 8px;
+ margin: 3px;
+ padding: 1px;
+}
+
+QComboBox
+{
+ margin: 1px;
+ padding-left: 4px;
+ border: 1px solid rgb(176, 204, 177);
+ selection-background-color: rgb(176, 204, 177);
+ selection-color: black;
+}
+
+QComboBox:disabled
+{
+ border: 1px solid gray;
+}
+
+QComboBox::down-arrow:enabled
+{
+ border: 1px solid rgb(124, 232, 0);
+ margin-right: 2px;
+ margin-top: 0px;
+ margin-bottom: 1px;
+}
+
+QComboBox::down-arrow:disabled
+{
+ border: 1px solid gray;
+ margin-right: 2px;
+ margin-top: 0px;
+ margin-bottom: 1px;
+}
+
+QComboBox::drop-down
+{
+ border: none;
+}
+
+QComboBox QAbstractItemView
+{
+ border: 1px solid gray;
+ outline: none;
+ selection-background-color: rgb(176, 204, 177);
+ selection-color: black;
+}
+
+QProgressBar
+{
+ color: black;
+ background-color: gray;
+ border: 0px none gray;
+ border-radius: 3px;
+ text-align: center;
+}
+
+QProgressBar::chunk
+{
+ border-radius: 3px;
+ background-color: rgb(176, 204, 177);
+}
+
+QStatusBar QProgressBar
+{
+ min-width: 300px;
+ max-width: 300px;
+ margin-right: 4px;
+}
+
+QStatusBar QLabel
+{
+ background-color: rgb(115, 133, 116);
+}
+
+QGroupBox
+{
+ padding-top: 8px;
+ border: 2px solid rgb(115, 133, 116);
+ border-radius: 4px;
+ margin-top: 3ex;
+}
+
+QGroupBox::title
+{
+ subcontrol-origin: border;
+ subcontrol-position: top left;
+ margin-top: 1ex;
+ margin-left: 0px;
+ padding-right: 0px;
+ padding-left: 0px;
+ top: -2ex;
+ left: 8px;
+}
+
+/*Setting this gives a more consistent look. Also, by omitting color and background color, it allows us to set it above with VariationTreeColorNonZero etc...*/
+QTreeView
+{
+ border: 1px solid rgb(176, 204, 177);
+ selection-background-color: #706F77;
+}
+
+QTreeView::item
+{
+ outline: none;
+ margin-right: 1px;
+}
+
+QTreeView::item:hover
+{
+ border: 0px none black;
+ color: rgb(221, 255, 130);
+ background-color: rgb(115, 133, 116);
+ outline: none;
+}
+
+QTreeView::item:selected
+{
+ border: 0px none black;
+ color: rgb(221, 255, 130);
+ background-color: rgb(115, 133, 116);
+ outline: none;
+}
+
+/*Specific controls*/
+QLineEdit#PaletteFilterLineEdit,
+QLineEdit#VariationsFilterLineEdit
+{
+ height: 20px;
+ min-height: 20px;
+ max-height: 20px;
+}
+
+QSpinBox#ThreadCountSpin,
+QSpinBox#RandomCountSpin,
+QSpinBox#CpuSubBatchSpin,
+QSpinBox#OpenCLSubBatchSpin,
+QSpinBox#CpuQualitySpin,
+QSpinBox#OpenCLQualitySpin,
+QDoubleSpinBox#OpenCLSubBatchPctSpin,
+QSpinBox#FinalRenderCurrentSpin,
+QSpinBox#FinalRenderThreadCountSpin,
+QDoubleSpinBox#FinalRenderOpenCLSubBatchPctSpin
+{
+ padding: 2px;
+ border: 1px solid rgb(115, 133, 116);
+}
+/*
+QSpinBox::up-arrow,
+QSpinBox::down-arrow
+{
+background-color: rgb(176, 204, 177);
+subcontrol-origin: border;
+subcontrol-position: top left;
+}
+*/
+QTableView#FinalRenderParamsTable QComboBox
+{
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+QTableView#FinalRenderParamsTable QPushButton
+{
+ margin-top: 1px;
+ margin-bottom: 2px;
+}
+
+QTableView#XaosTableView QHeaderView::section::vertical,
+QTableView#XaosDistVizTableWidget QHeaderView::section::vertical,
+QTableView#XaosAppliedTableView QHeaderView::section::vertical
+{
+ width: 19px;
+}
+
+QTableView#SummaryTable QHeaderView::section::vertical
+{
+ width: 69px;
+}
+
+QssDialog QssTextEdit#QssEdit
+{
+ color: black;
+ background-color: #FFFCE1;
+}
+
+QTextEdit#CreditsTextBrowser
+{
+ color: black;
+ background-color: #FFFCE1;
+}
diff --git a/Source/Ember/Variations04.h b/Source/Ember/Variations04.h
index bfcc946..96cc31b 100644
--- a/Source/Ember/Variations04.h
+++ b/Source/Ember/Variations04.h
@@ -1784,7 +1784,7 @@ public:
<< "\t\t}\n"
<< "\n"
<< "\t\tvOut.x = fma(" << cosr << ", a, " << sinr << " * r);\n"
- << "\t\tvOut.y = -fma(" << sinr << ", a, " << cosr << " * r);\n"
+ << "\t\tvOut.y = fma(-" << sinr << ", a, " << cosr << " * r);\n"
<< "\t\tvOut.z = " << DefaultZCl()
<< "\t}\n";
return ss.str();
diff --git a/Source/Fractorium/Fractorium.cpp b/Source/Fractorium/Fractorium.cpp
index a1995fb..d338dd2 100644
--- a/Source/Fractorium/Fractorium.cpp
+++ b/Source/Fractorium/Fractorium.cpp
@@ -360,6 +360,14 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
static int fcount = 0;//Qt seems to deliver three events for every key press. So a count must be kept to only respond to the third event.
static int xfupcount = 0;
static int xfdncount = 0;
+ static int wcount = 0;
+ static int scount = 0;
+ static int acount = 0;
+ static int dcount = 0;
+ static int qcount = 0;
+ static int ecount = 0;
+ static int gcount = 0;
+ static int hcount = 0;
if (o == ui.GLParentScrollArea && e->type() == QEvent::Resize)
{
@@ -406,10 +414,45 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
auto focusedctrlEdit = dynamic_cast(this->focusWidget());
auto focusedctrlSpin = dynamic_cast(this->focusWidget());
auto focusedctrlDblSpin = dynamic_cast(this->focusWidget());
+ auto focusedctrlCombo = dynamic_cast(this->focusWidget());
- if (!focusedctrlEdit && !focusedctrlSpin && !focusedctrlDblSpin)//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform.
+ if (!focusedctrlEdit &&
+ !focusedctrlSpin &&
+ !focusedctrlDblSpin &&
+ !focusedctrlCombo)//Must exclude these because otherwise, typing a minus key in any of the spinners will switch the xform.
{
unsigned int index = combo->currentIndex();
+ double vdist = 0.01;
+ double hdist = 0.01;
+ double rot = 1;
+ double grow = 0.01;
+ bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
+ bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
+ bool pre = true;
+
+ if (auto r = m_Controller->Renderer())
+ {
+ hdist = std::abs(r->UpperRightX() - r->LowerLeftX()) * 0.01 * m_Controller->AffineScaleLockedToCurrent();
+ vdist = std::abs(r->UpperRightY() - r->LowerLeftY()) * 0.01 * m_Controller->AffineScaleLockedToCurrent();
+
+ if (shift)
+ {
+ hdist *= 0.1;
+ vdist *= 0.1;
+ rot *= 0.1;
+ grow *= 0.1;
+ }
+ else if (ctrl)
+ {
+ hdist *= 10;
+ vdist *= 10;
+ rot *= 10;
+ grow *= 10;
+ }
+ }
+
+ if (m_Controller.get() && m_Controller->GLController())
+ pre = m_Controller->GLController()->AffineType() == eAffineType::AffinePre;
if (ke->key() == Qt::Key_Plus || ke->key() == Qt::Key_Equal)
{
@@ -441,6 +484,94 @@ bool Fractorium::eventFilter(QObject* o, QEvent* e)
return true;
}
+ else if (ke->key() == Qt::Key_W)
+ {
+ wcount++;
+
+ if (wcount >= 3)
+ {
+ wcount = 0;
+ m_Controller->MoveXforms(0, vdist, pre);
+ }
+
+ return true;
+ }
+ else if (ke->key() == Qt::Key_S)
+ {
+ scount++;
+
+ if (scount >= 3)
+ {
+ scount = 0;
+ m_Controller->MoveXforms(0, -vdist, pre);
+ }
+
+ return true;
+ }
+ else if (ke->key() == Qt::Key_A)
+ {
+ acount++;
+
+ if (acount >= 3)
+ {
+ acount = 0;
+ m_Controller->MoveXforms(-hdist, 0, pre);
+ }
+
+ return true;
+ }
+ else if (ke->key() == Qt::Key_D)
+ {
+ dcount++;
+
+ if (dcount >= 3)
+ {
+ dcount = 0;
+ m_Controller->MoveXforms(hdist, 0, pre);
+ }
+
+ return true;
+ }
+ else if (ke->key() == Qt::Key_Q)
+ {
+ qcount++;
+
+ if (qcount >= 3)
+ {
+ qcount = 0;
+ m_Controller->RotateXformsByAngle(-rot, pre);
+ }
+ }
+ else if (ke->key() == Qt::Key_E)
+ {
+ ecount++;
+
+ if (ecount >= 3)
+ {
+ ecount = 0;
+ m_Controller->RotateXformsByAngle(rot, pre);
+ }
+ }
+ else if (ke->key() == Qt::Key_G)
+ {
+ gcount++;
+
+ if (gcount >= 3)
+ {
+ gcount = 0;
+ m_Controller->ScaleXforms(1 - grow, pre);
+ }
+ }
+ else if (ke->key() == Qt::Key_H)
+ {
+ hcount++;
+
+ if (hcount >= 3)
+ {
+ hcount = 0;
+ m_Controller->ScaleXforms(1 + grow, pre);
+ }
+ }
}
}
}
@@ -1011,6 +1142,7 @@ void Fractorium::SetTabOrders()
/// The logic is:
/// If any cell in the row is non zero, set all cells to zero, else 1.
/// If shift is held down, reverse the logic.
+/// If ctrl is held down, set each cell to a random 0 or 1.
/// Resets the rendering process.
///
/// The QTableWidget or QTableView whose row will be toggled
@@ -1021,6 +1153,7 @@ void Fractorium::ToggleTableRow(QTableView* table, int logicalIndex)
auto model = table->model();
int cols = model->columnCount();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
+ bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
auto tableWidget = qobject_cast(table);
if (tableWidget)
@@ -1044,7 +1177,10 @@ void Fractorium::ToggleTableRow(QTableView* table, int logicalIndex)
for (int i = 0; i < cols; i++)
if (auto spinBox = qobject_cast(tableWidget->cellWidget(logicalIndex, i)))
- spinBox->setValue(val);
+ if (ctrl)
+ spinBox->setValue(double(QTIsaac::LockedRandBit()));
+ else
+ spinBox->setValue(val);
}
else
{
@@ -1063,7 +1199,10 @@ void Fractorium::ToggleTableRow(QTableView* table, int logicalIndex)
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < cols; i++)
- model->setData(model->index(logicalIndex, i), val, Qt::EditRole);
+ if (ctrl)
+ model->setData(model->index(logicalIndex, i), double(QTIsaac::LockedRandBit()), Qt::EditRole);
+ else
+ model->setData(model->index(logicalIndex, i), val, Qt::EditRole);
}
}
@@ -1072,6 +1211,7 @@ void Fractorium::ToggleTableRow(QTableView* table, int logicalIndex)
/// The logic is:
/// If any cell in the column is non zero, set all cells to zero, else 1.
/// If shift is held down, reverse the logic.
+/// If ctrl is held down, set each cell to a random 0 or 1.
/// Resets the rendering process.
///
/// The QTableWidget or QTableView whose column will be toggled
@@ -1082,6 +1222,7 @@ void Fractorium::ToggleTableCol(QTableView* table, int logicalIndex)
auto model = table->model();
int rows = model->rowCount();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
+ bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
auto tableWidget = qobject_cast(table);
if (tableWidget)
@@ -1105,7 +1246,10 @@ void Fractorium::ToggleTableCol(QTableView* table, int logicalIndex)
for (int i = 0; i < rows; i++)
if (auto spinBox = qobject_cast(tableWidget->cellWidget(i, logicalIndex)))
- spinBox->setValue(val);
+ if (ctrl)
+ spinBox->setValue(double(QTIsaac::LockedRandBit()));
+ else
+ spinBox->setValue(val);
}
else
{
@@ -1124,7 +1268,10 @@ void Fractorium::ToggleTableCol(QTableView* table, int logicalIndex)
double val = allZero ? 1.0 : 0.0;
for (int i = 0; i < rows; i++)
- model->setData(model->index(i, logicalIndex), val, Qt::EditRole);
+ if (ctrl)
+ model->setData(model->index(i, logicalIndex), double(QTIsaac::LockedRandBit()), Qt::EditRole);
+ else
+ model->setData(model->index(i, logicalIndex), val, Qt::EditRole);
}
}
diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui
index 5968cec..7b2dd55 100644
--- a/Source/Fractorium/Fractorium.ui
+++ b/Source/Fractorium/Fractorium.ui
@@ -2784,7 +2784,10 @@
false
- QAbstractItemView::NoSelection
+ QAbstractItemView::SingleSelection
+
+
+ QAbstractItemView::SelectRows
QAbstractItemView::ScrollPerPixel
@@ -4321,7 +4324,7 @@
- Move xform x units right
+ Move xform x units right (D)
@@ -4373,7 +4376,7 @@
- Move xform x units up
+ Move xform x units up (W)
@@ -4457,7 +4460,7 @@
- Scale xform x percent up
+ Scale xform x percent up (H)
@@ -4483,7 +4486,7 @@
- Scale xform x percent down
+ Scale xform x percent down (G)
@@ -4601,7 +4604,7 @@
- Rotate xform x degrees clockwise
+ Rotate xform x degrees clockwise (E)
@@ -4627,7 +4630,7 @@
- Rotate xform x degrees counter clockwise
+ Rotate xform x degrees counter clockwise (Q)
@@ -4732,7 +4735,7 @@
- Move xform x units left
+ Move xform x units left (A)
@@ -4791,7 +4794,7 @@
- Move xform x units down
+ Move xform x units down (S)
@@ -5156,7 +5159,7 @@
- Rotate xform x degrees clockwise
+ Rotate xform x degrees clockwise (E)
@@ -5185,7 +5188,7 @@
- Rotate xform x degrees counter clockwise
+ Rotate xform x degrees counter clockwise (Q)
@@ -5385,7 +5388,7 @@
- Scale xform x percent up
+ Scale xform x percent up (H)
@@ -5414,7 +5417,7 @@
- Scale xform x percent down
+ Scale xform x percent down (G)
@@ -5443,7 +5446,7 @@
- Move xform x units left
+ Move xform x units left (A)
@@ -5508,7 +5511,7 @@
- Move xform x units right
+ Move xform x units right (D)
@@ -5566,7 +5569,7 @@
- Move xform x units up
+ Move xform x units up (W)
@@ -5685,7 +5688,7 @@
- Move xform x units down
+ Move xform x units down (S)
@@ -8258,7 +8261,7 @@
Save the current flame as an xml file
- Ctrl+S
+ Ctrl+T
@@ -8309,13 +8312,13 @@
:/Fractorium/Icons/068123-3d-transparent-glass-icon-alphanumeric-question-mark3.png:/Fractorium/Icons/068123-3d-transparent-glass-icon-alphanumeric-question-mark3.png
- New &random Flame
+ New &random flame
Add a new random flame to the end of the current file
- Ctrl+R
+ Ctrl+M
@@ -8333,7 +8336,7 @@
Save all flames as a single xml file
- Ctrl+Shift+S
+ Ctrl+Shift+T
@@ -8380,7 +8383,7 @@
Add a new empty flame to the end of the current file
- Ctrl+E
+ Ctrl+Y
@@ -8708,7 +8711,7 @@
Alternate editor/image
- Ctrl+W
+ Ctrl+L
diff --git a/Source/Fractorium/FractoriumEmberController.h b/Source/Fractorium/FractoriumEmberController.h
index 2885d2c..748853b 100644
--- a/Source/Fractorium/FractoriumEmberController.h
+++ b/Source/Fractorium/FractoriumEmberController.h
@@ -211,6 +211,8 @@ public:
double LockedY() { return m_LockedY; }
void LockedScale(double scale) { m_LockedScale = scale; }
virtual void InitLockedScale() { }
+ virtual double AffineScaleCurrentToLocked() { return 0; };
+ virtual double AffineScaleLockedToCurrent() { return 0; };
//Xforms Color.
virtual void XformColorIndexChanged(double d, bool updateRender, bool updateSpinner, bool updateScroll, eXformUpdate update = eXformUpdate::UPDATE_SELECTED, size_t index = 0) { }
@@ -496,10 +498,10 @@ public:
virtual void FillBothAffines() override;
virtual void SwapAffines() override;
virtual void InitLockedScale() override;
+ virtual double AffineScaleCurrentToLocked() override;
+ virtual double AffineScaleLockedToCurrent() override;
void FillAffineWithXform(Xform* xform, bool pre);
void ChangeLockedScale(T value);
- T AffineScaleCurrentToLocked();
- T AffineScaleLockedToCurrent();
//Xforms Color.
virtual void XformColorIndexChanged(double d, bool updateRender, bool updateSpinner, bool updateScroll, eXformUpdate update = eXformUpdate::UPDATE_SELECTED, size_t index = 0) override;
diff --git a/Source/Fractorium/FractoriumXaos.cpp b/Source/Fractorium/FractoriumXaos.cpp
index c6d0353..004e640 100644
--- a/Source/Fractorium/FractoriumXaos.cpp
+++ b/Source/Fractorium/FractoriumXaos.cpp
@@ -225,6 +225,7 @@ void Fractorium::OnClearXaosButtonClicked(bool checked) { m_Controller->ClearXao
template
void FractoriumEmberController::RandomXaos()
{
+ bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
Update([&]
{
size_t i = 0;
@@ -233,7 +234,9 @@ void FractoriumEmberController::RandomXaos()
{
for (size_t j = 0; j < m_Ember.XformCount(); j++)
{
- if (m_Rand.RandBit())
+ if (!ctrl)
+ xform->SetXaos(j, T(m_Rand.RandBit()));
+ else if (m_Rand.RandBit())
xform->SetXaos(j, T(m_Rand.RandBit()));
else
xform->SetXaos(j, TruncPrecision(m_Rand.Frand(0, 3), 3));
diff --git a/Source/Fractorium/FractoriumXformsAffine.cpp b/Source/Fractorium/FractoriumXformsAffine.cpp
index 07b95f5..ab53e93 100644
--- a/Source/Fractorium/FractoriumXformsAffine.cpp
+++ b/Source/Fractorium/FractoriumXformsAffine.cpp
@@ -188,7 +188,7 @@ void FractoriumEmberController::ChangeLockedScale(T value)
///
/// The scale value
template
-T FractoriumEmberController::AffineScaleCurrentToLocked()
+double FractoriumEmberController::AffineScaleCurrentToLocked()
{
return LockedScale() / m_Ember.m_PixelsPerUnit;
}
@@ -198,7 +198,7 @@ T FractoriumEmberController::AffineScaleCurrentToLocked()
///
/// The scale value
template
-T FractoriumEmberController::AffineScaleLockedToCurrent()
+double FractoriumEmberController::AffineScaleLockedToCurrent()
{
return m_Ember.m_PixelsPerUnit / LockedScale();
}
diff --git a/Source/Fractorium/GLEmberController.h b/Source/Fractorium/GLEmberController.h
index 5dd0857..1b2be5b 100644
--- a/Source/Fractorium/GLEmberController.h
+++ b/Source/Fractorium/GLEmberController.h
@@ -62,6 +62,7 @@ public:
void ClearShift();
void ClearControl();
eDragState DragState() { return m_DragState; }
+ eAffineType AffineType() { return m_AffineType; }
virtual void DrawImage() { }
virtual void DrawAffines(bool pre, bool post) { }
virtual void ClearWindow() { }
diff --git a/Source/Fractorium/GLWidget.cpp b/Source/Fractorium/GLWidget.cpp
index 2c23fc7..e96c1cc 100644
--- a/Source/Fractorium/GLWidget.cpp
+++ b/Source/Fractorium/GLWidget.cpp
@@ -1996,8 +1996,8 @@ bool GLEmberController::CheckXformHover(Xform* xform, v3T& glCoords, T& be
template
void GLEmberController::CalcDragXAxis()
{
- auto affineToWorldScale = m_FractoriumEmberController->AffineScaleLockedToCurrent();
- auto worldToAffineScale = m_FractoriumEmberController->AffineScaleCurrentToLocked();
+ T affineToWorldScale = T(m_FractoriumEmberController->AffineScaleLockedToCurrent());
+ T worldToAffineScale = T(m_FractoriumEmberController->AffineScaleCurrentToLocked());
bool pre = m_AffineType == eAffineType::AffinePre;
bool worldPivotShiftAlt = !m_Fractorium->LocalPivot() && GetShift() && GetAlt();
auto worldRelAxisStartScaled = (v2T(m_HoverHandlePos) * affineToWorldScale) - m_DragSrcTransform.O();//World axis start position, relative, scaled by the zoom.
@@ -2161,8 +2161,8 @@ void GLEmberController::CalcDragXAxis()
template
void GLEmberController::CalcDragYAxis()
{
- auto affineToWorldScale = m_FractoriumEmberController->AffineScaleLockedToCurrent();
- auto worldToAffineScale = m_FractoriumEmberController->AffineScaleCurrentToLocked();
+ T affineToWorldScale = T(m_FractoriumEmberController->AffineScaleLockedToCurrent());
+ T worldToAffineScale = T(m_FractoriumEmberController->AffineScaleCurrentToLocked());
bool pre = m_AffineType == eAffineType::AffinePre;
bool worldPivotShiftAlt = !m_Fractorium->LocalPivot() && GetShift() && GetAlt();
auto worldRelAxisStartScaled = (v2T(m_HoverHandlePos) * affineToWorldScale) - m_DragSrcTransform.O();//World axis start position, relative, scaled by the zoom.
@@ -2321,8 +2321,8 @@ void GLEmberController::CalcDragYAxis()
template
void GLEmberController::CalcDragTranslation()
{
- auto affineToWorldScale = m_FractoriumEmberController->AffineScaleLockedToCurrent();
- auto worldToAffineScale = m_FractoriumEmberController->AffineScaleCurrentToLocked();
+ T affineToWorldScale = T(m_FractoriumEmberController->AffineScaleLockedToCurrent());
+ T worldToAffineScale = T(m_FractoriumEmberController->AffineScaleCurrentToLocked());
bool worldPivotShift = !m_Fractorium->LocalPivot() && GetShift();
bool pre = m_AffineType == eAffineType::AffinePre;
diff --git a/Source/Fractorium/TwoButtonComboWidget.h b/Source/Fractorium/TwoButtonComboWidget.h
index e165d16..766aa32 100644
--- a/Source/Fractorium/TwoButtonComboWidget.h
+++ b/Source/Fractorium/TwoButtonComboWidget.h
@@ -115,6 +115,11 @@ public:
QPushButton* m_Button;
};
+///
+/// Thin container that is both a widget and a container of one DoubleSpinBox and one QLabel.
+/// Used for when a layout expects a single widget, but two need to go in its place.
+/// The widgets are public so the caller can easily use them individually.
+///
class SpinnerLabelWidget : public QWidget
{
Q_OBJECT
@@ -150,6 +155,9 @@ protected:
QHBoxLayout* m_L;
};
+///
+/// Thin derivation that adds a button to a SpinnerLabelWidget.
+///
class SpinnerLabelButtonWidget : public SpinnerLabelWidget
{
Q_OBJECT
@@ -184,7 +192,11 @@ public:
QPushButton* m_Button;
};
-
+///
+/// Thin container that is both a widget and a container of one DoubleSpinBox and one SpinBox.
+/// Used for when a layout expects a single widget, but two need to go in its place.
+/// The widgets are public so the caller can easily use them individually.
+///
class DoubleIntSpinnerWidget : public QWidget
{
Q_OBJECT
diff --git a/archive/build_linux.sh b/archive/build_linux.sh
index b2185ea..7ebf163 100755
--- a/archive/build_linux.sh
+++ b/archive/build_linux.sh
@@ -97,6 +97,7 @@ cp $EXTRA_LIBS/libtbb.so.2 $FRACTORIUM_LIB
cp $DATA_PATH/dark_linux.qss $FRACTORIUM_BIN
cp $DATA_PATH/lightdark.qss $FRACTORIUM_BIN
+cp $DATA_PATH/uranium.qss $FRACTORIUM_BIN
cp $DATA_PATH/flam3-palettes.xml $FRACTORIUM_BIN
cp $DATA_PATH/*.gradient $FRACTORIUM_BIN
cp $DATA_PATH/*.ugr $FRACTORIUM_BIN