More Misc Fixes (#53)

This commit is contained in:
Jeremy Bullock 2020-06-19 00:53:43 -06:00 committed by GitHub
parent a970d34579
commit 39a6f091ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 351 additions and 153 deletions

View file

@ -325,10 +325,10 @@ TPanelTitleBarButton {
Scrollbars
----------------------------------------------------------------------------- */
QAbstractScrollArea::corner {
background-color: #28292b;
background-color: #414345;
}
QScrollBar {
background-color: #28292b;
background-color: #414345;
border: 0;
}
QScrollBar:horizontal {
@ -340,26 +340,26 @@ QScrollBar:vertical {
width: 16;
}
QScrollBar::handle {
border: 1 solid #4b4d50;
border: 1 solid #505255;
border-radius: 4;
}
QScrollBar::handle:horizontal:hover,
QScrollBar::handle:vertical:hover {
background-color: #5f6265;
border-color: #5f6265;
background-color: #64676a;
border-color: #64676a;
}
QScrollBar::handle:horizontal:pressed,
QScrollBar::handle:vertical:pressed {
background-color: #72767a;
border-color: #72767a;
background-color: #777b7f;
border-color: #777b7f;
}
QScrollBar::handle:horizontal {
background-color: #4b4d50;
background-color: #505255;
margin: 3 16;
min-width: 20;
}
QScrollBar::handle:vertical {
background-color: #4b4d50;
background-color: #505255;
margin: 16 3;
min-height: 20;
}
@ -369,13 +369,13 @@ QScrollBar::add-line {
}
QScrollBar::add-line:horizontal {
subcontrol-position: right;
background-color: #28292b;
background-color: #414345;
margin: 0;
width: 16;
}
QScrollBar::add-line:vertical {
subcontrol-position: bottom;
background-color: #28292b;
background-color: #414345;
margin: 0;
height: 16;
}
@ -385,13 +385,13 @@ QScrollBar::sub-line {
}
QScrollBar::sub-line:horizontal {
subcontrol-position: left;
background-color: #28292b;
background-color: #414345;
margin: 0;
width: 16;
}
QScrollBar::sub-line:vertical {
subcontrol-position: top;
background-color: #28292b;
background-color: #414345;
margin: 0;
height: 16;
}
@ -732,20 +732,19 @@ QTabBar::tab:only-one {
----------------------------------------------------------------------------- */
#StatusBar {
background-color: #414345;
color: #d6d8dd;
color: orange;
border-top: 1px outset #141516;
}
#StatusBar:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowLabel {
#MainWindowMessageLabel {
background-color: #414345;
padding-left: 10px;
padding-right: 10px;
color: #d6d8dd;
border-left: 2px outset #212223;
color: #5385a6;
}
#MainWindowLabel:disabled {
#MainWindowMessageLabel:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowPlainLabel {
@ -1864,7 +1863,7 @@ QToolBar#WidePaddingToolBar QToolButton {
#ViewerPanel #ToolBarContainer,
FlipBook #ToolBarContainer {
background-color: transparent;
border-top: 2 solid #212223;
border-top: 1 solid #212223;
border-bottom: 1 solid #212223;
padding-right: -1;
}
@ -1951,6 +1950,10 @@ Ruler {
#RulerToolOptionValues {
color: #000000;
}
SceneViewer {
qproperty-BGColor: #37393a;
qproperty-PreviewBGColor: #2d2f30;
}
/* -----------------------------------------------------------------------------
XSheet Viewer
----------------------------------------------------------------------------- */

View file

@ -325,10 +325,10 @@ TPanelTitleBarButton {
Scrollbars
----------------------------------------------------------------------------- */
QAbstractScrollArea::corner {
background-color: #161616;
background-color: #303030;
}
QScrollBar {
background-color: #161616;
background-color: #303030;
border: 0;
}
QScrollBar:horizontal {
@ -340,26 +340,26 @@ QScrollBar:vertical {
width: 16;
}
QScrollBar::handle {
border: 1 solid #3a3a3a;
border: 1 solid #3f3f3f;
border-radius: 4;
}
QScrollBar::handle:horizontal:hover,
QScrollBar::handle:vertical:hover {
background-color: #4f4f4f;
border-color: #4f4f4f;
background-color: #545454;
border-color: #545454;
}
QScrollBar::handle:horizontal:pressed,
QScrollBar::handle:vertical:pressed {
background-color: #636363;
border-color: #636363;
background-color: #686868;
border-color: #686868;
}
QScrollBar::handle:horizontal {
background-color: #3a3a3a;
background-color: #3f3f3f;
margin: 3 16;
min-width: 20;
}
QScrollBar::handle:vertical {
background-color: #3a3a3a;
background-color: #3f3f3f;
margin: 16 3;
min-height: 20;
}
@ -369,13 +369,13 @@ QScrollBar::add-line {
}
QScrollBar::add-line:horizontal {
subcontrol-position: right;
background-color: #161616;
background-color: #303030;
margin: 0;
width: 16;
}
QScrollBar::add-line:vertical {
subcontrol-position: bottom;
background-color: #161616;
background-color: #303030;
margin: 0;
height: 16;
}
@ -385,13 +385,13 @@ QScrollBar::sub-line {
}
QScrollBar::sub-line:horizontal {
subcontrol-position: left;
background-color: #161616;
background-color: #303030;
margin: 0;
width: 16;
}
QScrollBar::sub-line:vertical {
subcontrol-position: top;
background-color: #161616;
background-color: #303030;
margin: 0;
height: 16;
}
@ -732,20 +732,19 @@ QTabBar::tab:only-one {
----------------------------------------------------------------------------- */
#StatusBar {
background-color: #303030;
color: #e6e6e6;
color: orange;
border-top: 1px outset #020202;
}
#StatusBar:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowLabel {
#MainWindowMessageLabel {
background-color: #303030;
padding-left: 10px;
padding-right: 10px;
color: #e6e6e6;
border-left: 2px outset #4c4c4c;
color: #5385a6;
}
#MainWindowLabel:disabled {
#MainWindowMessageLabel:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowPlainLabel {
@ -1864,7 +1863,7 @@ QToolBar#WidePaddingToolBar QToolButton {
#ViewerPanel #ToolBarContainer,
FlipBook #ToolBarContainer {
background-color: transparent;
border-top: 2 solid #161616;
border-top: 1 solid #161616;
border-bottom: 1 solid #161616;
padding-right: -1;
}
@ -1951,6 +1950,10 @@ Ruler {
#RulerToolOptionValues {
color: #000000;
}
SceneViewer {
qproperty-BGColor: #262626;
qproperty-PreviewBGColor: #1c1c1c;
}
/* -----------------------------------------------------------------------------
XSheet Viewer
----------------------------------------------------------------------------- */

View file

@ -732,20 +732,19 @@ QTabBar::tab:only-one {
----------------------------------------------------------------------------- */
#StatusBar {
background-color: #DBDBDB;
color: #000;
color: darkblue;
border-top: 1px outset #828282;
}
#StatusBar:disabled {
color: rgba(43, 20, 20, 0.466);
}
#MainWindowLabel {
#MainWindowMessageLabel {
background-color: #DBDBDB;
padding-left: 10px;
padding-right: 10px;
color: #000;
border-left: 2px outset #9b9b9b;
color: #F19A86;
}
#MainWindowLabel:disabled {
#MainWindowMessageLabel:disabled {
color: rgba(43, 20, 20, 0.466);
}
#MainWindowPlainLabel {
@ -1865,7 +1864,7 @@ QToolBar#WidePaddingToolBar QToolButton {
#ViewerPanel #ToolBarContainer,
FlipBook #ToolBarContainer {
background-color: transparent;
border-top: 2 solid #9b9b9b;
border-top: 1 solid #9b9b9b;
border-bottom: 1 solid #9b9b9b;
padding-right: -1;
}
@ -1952,6 +1951,10 @@ Ruler {
#RulerToolOptionValues {
color: #5b5b5b;
}
SceneViewer {
qproperty-BGColor: #d1d1d1;
qproperty-PreviewBGColor: #c7c7c7;
}
/* -----------------------------------------------------------------------------
XSheet Viewer
----------------------------------------------------------------------------- */

View file

@ -325,10 +325,10 @@ TPanelTitleBarButton {
Scrollbars
----------------------------------------------------------------------------- */
QAbstractScrollArea::corner {
background-color: #2f2f2f;
background-color: #484848;
}
QScrollBar {
background-color: #2f2f2f;
background-color: #484848;
border: 0;
}
QScrollBar:horizontal {
@ -340,26 +340,26 @@ QScrollBar:vertical {
width: 16;
}
QScrollBar::handle {
border: 1 solid #525252;
border: 1 solid #575757;
border-radius: 4;
}
QScrollBar::handle:horizontal:hover,
QScrollBar::handle:vertical:hover {
background-color: #676767;
border-color: #676767;
background-color: #6c6c6c;
border-color: #6c6c6c;
}
QScrollBar::handle:horizontal:pressed,
QScrollBar::handle:vertical:pressed {
background-color: #7b7b7b;
border-color: #7b7b7b;
background-color: #808080;
border-color: #808080;
}
QScrollBar::handle:horizontal {
background-color: #525252;
background-color: #575757;
margin: 3 16;
min-width: 20;
}
QScrollBar::handle:vertical {
background-color: #525252;
background-color: #575757;
margin: 16 3;
min-height: 20;
}
@ -369,13 +369,13 @@ QScrollBar::add-line {
}
QScrollBar::add-line:horizontal {
subcontrol-position: right;
background-color: #2f2f2f;
background-color: #484848;
margin: 0;
width: 16;
}
QScrollBar::add-line:vertical {
subcontrol-position: bottom;
background-color: #2f2f2f;
background-color: #484848;
margin: 0;
height: 16;
}
@ -385,13 +385,13 @@ QScrollBar::sub-line {
}
QScrollBar::sub-line:horizontal {
subcontrol-position: left;
background-color: #2f2f2f;
background-color: #484848;
margin: 0;
width: 16;
}
QScrollBar::sub-line:vertical {
subcontrol-position: top;
background-color: #2f2f2f;
background-color: #484848;
margin: 0;
height: 16;
}
@ -732,20 +732,19 @@ QTabBar::tab:only-one {
----------------------------------------------------------------------------- */
#StatusBar {
background-color: #484848;
color: #e6e6e6;
color: orange;
border-top: 1px outset #1a1a1a;
}
#StatusBar:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowLabel {
#MainWindowMessageLabel {
background-color: #484848;
padding-left: 10px;
padding-right: 10px;
color: #e6e6e6;
border-left: 2px outset #272727;
color: #5385a6;
}
#MainWindowLabel:disabled {
#MainWindowMessageLabel:disabled {
color: rgba(230, 230, 230, 0.4);
}
#MainWindowPlainLabel {
@ -1864,7 +1863,7 @@ QToolBar#WidePaddingToolBar QToolButton {
#ViewerPanel #ToolBarContainer,
FlipBook #ToolBarContainer {
background-color: transparent;
border-top: 2 solid #272727;
border-top: 1 solid #272727;
border-bottom: 1 solid #272727;
padding-right: -1;
}
@ -1951,6 +1950,10 @@ Ruler {
#RulerToolOptionValues {
color: #000000;
}
SceneViewer {
qproperty-BGColor: #3e3e3e;
qproperty-PreviewBGColor: #343434;
}
/* -----------------------------------------------------------------------------
XSheet Viewer
----------------------------------------------------------------------------- */

View file

@ -12,6 +12,8 @@
@img-url: 'imgs/white';
@bg: #484848; // normal
@bg-darkish: darken(@bg, 4);
@bg-darker: darken(@bg, 8);
@bg-dark: darken(@bg, 13); // dark
@accent: darken(@bg, 13); // darkest
@ -37,6 +39,8 @@
@label-title: rgb(159, 218, 255);
@label-error: rgb(255, 0, 0);
@status-hl-color: orange;
// -----------------------------------------------------------------------------
// Tabs
// -----------------------------------------------------------------------------
@ -87,14 +91,14 @@
// -----------------------------------------------------------------------------
// Container
@scrollbar-bg-color: darken(@bg, 10);
@scrollbar-bg-color: @bg;
// Handle
@scrollbar-handle-border-size: 1;
@scrollbar-handle-radius: 4;
@scrollbar-handle-margin: 3;
@scrollbar-handle-bg-color: lighten(@bg, 4);
@scrollbar-handle-bg-color: lighten(@bg, 6);
@scrollbar-handle-border-color: @scrollbar-handle-bg-color;
@scrollbar-handle-bg-color-hover: lighten(@scrollbar-handle-bg-color, 8);

View file

@ -640,19 +640,18 @@ QTabBar {
#StatusBar {
background-color: @bg;
color: @text-color;
color: @status-hl-color;
border-top: 1px outset @dock-bg-color;
&:disabled {
color: @text-color-disabled;
}
}
#MainWindowLabel {
#MainWindowMessageLabel {
background-color: @bg;
padding-left: 10px;
padding-right: 10px;
color: @text-color;
border-left: 2px outset @menu-border-color;
color: @hl-bg-color;
&:disabled {
color: @text-color-disabled;
}

View file

@ -25,7 +25,7 @@
FlipBook {
& #ToolBarContainer {
background-color: transparent;
border-top: 2 solid @accent;
border-top: 1 solid @accent;
border-bottom: 1 solid @accent;
padding-right: -1; // hides right border on #ScrollRightButton when
// fps slider is disabled
@ -143,3 +143,9 @@ Ruler {
#RulerToolOptionValues {
color: @viewer-ruler-ToolOptionValues-color;
}
SceneViewer {
qproperty-BGColor: @bg-darkish;
qproperty-PreviewBGColor: @bg-darker;
}

View file

@ -23,6 +23,8 @@
@label-title: rgb(0, 0, 0);
@status-hl-color: darkblue;
// -----------------------------------------------------------------------------
// Titlebars
// -----------------------------------------------------------------------------

View file

@ -435,6 +435,9 @@ public:
// Colors tab
TPixel getViewerBgColor() const { return getColorValue(viewerBGColor); }
TPixel getPreviewBgColor() const { return getColorValue(previewBGColor); }
bool getUseThemeViewerColors() const {
return getBoolValue(useThemeViewerColors);
}
TPixel getLevelEditorBoxColor() const {
return getColorValue(levelEditorBoxColor);
}

View file

@ -155,6 +155,7 @@ enum PreferencesItemId {
// Colors
viewerBGColor,
previewBGColor,
useThemeViewerColors,
levelEditorBoxColor,
chessboardColor1,
chessboardColor2,

View file

@ -1664,92 +1664,167 @@ QAction *MainWindow::createToolAction(const char *id, const char *iconName,
//-----------------------------------------------------------------------------
void MainWindow::defineActions() {
createMenuFileAction(MI_NewScene, tr("&New Scene"), "Ctrl+N");
createMenuFileAction(MI_LoadScene, tr("&Load Scene..."), "Ctrl+L");
createMenuFileAction(MI_SaveScene, tr("&Save Scene"), "Ctrl+Shift+S");
createMenuFileAction(MI_SaveSceneAs, tr("&Save Scene As..."), "");
createMenuFileAction(MI_SaveAll, tr("&Save All"), "Ctrl+S");
createMenuFileAction(MI_RevertScene, tr("&Revert Scene"), "");
QString separator = " ";
createMenuFileAction(MI_NewScene, tr("&New Scene"), "Ctrl+N",
tr("Create a new scene."));
createMenuFileAction(MI_LoadScene, tr("&Load Scene..."), "Ctrl+L",
tr("Load an existing scene."));
createMenuFileAction(MI_SaveScene, tr("&Save Scene"), "Ctrl+Shift+S",
tr("Save ONLY the scene.") + separator +
tr("This does NOT save levels or images."));
createMenuFileAction(MI_SaveSceneAs, tr("&Save Scene As..."), "",
tr("Save ONLY the scene with a new name.") + separator +
tr("This does NOT save levels or images."));
createMenuFileAction(MI_SaveAll, tr("&Save All"), "Ctrl+S",
tr("Save the scene info and the levels and images.") +
separator + tr("Saves everything."));
createMenuFileAction(MI_RevertScene, tr("&Revert Scene"), "",
tr("Revert the scene to its previously saved state."));
QAction *act = CommandManager::instance()->getAction(MI_RevertScene);
if (act) act->setEnabled(false);
QList<QString> files;
createMenuFileAction(MI_LoadFolder, tr("&Load Folder..."), "");
createMenuFileAction(MI_LoadSubSceneFile, tr("&Load As Sub-xsheet..."), "");
createMenuAction(MI_OpenRecentScene, tr("&Open Recent Scene File"), files);
createMenuAction(MI_OpenRecentLevel, tr("&Open Recent Level File"), files);
createMenuFileAction(
MI_LoadFolder, tr("&Load Folder..."), "",
tr("Load the contents of a folder into the current scene."));
createMenuFileAction(
MI_LoadSubSceneFile, tr("&Load As Sub-xsheet..."), "",
tr("Load an existing scene into the current scene as a sub-xsheet"));
createMenuAction(MI_OpenRecentScene, tr("&Open Recent Scene File"), files,
tr("Load a recently used scene."));
createMenuAction(MI_OpenRecentLevel, tr("&Open Recent Level File"), files,
tr("Load a recently used level."));
createMenuFileAction(MI_ClearRecentScene, tr("&Clear Recent Scene File List"),
"");
"", tr("Remove everything from the recent scene list."));
createMenuFileAction(MI_ClearRecentLevel, tr("&Clear Recent level File List"),
"");
createMenuLevelAction(MI_NewLevel, tr("&New Level..."), "Alt+N");
"", tr("Remove everything from the recent level list."));
createMenuLevelAction(MI_NewLevel, tr("&New Level..."), "Alt+N",
tr("Create a new drawing layer."));
QAction *newVectorLevelAction =
createMenuLevelAction(MI_NewVectorLevel, tr("&New Vector Level"), "");
createMenuLevelAction(MI_NewVectorLevel, tr("&New Vector Level"), "",
tr("Create a new vector level.") + separator +
tr("Vectors can be manipulated easily and have "
"some extra tools and features."));
newVectorLevelAction->setIconText(tr("New Vector Level"));
newVectorLevelAction->setIcon(QIcon(":Resources/new_vector_level.svg"));
QAction *newToonzRasterLevelAction = createMenuLevelAction(
MI_NewToonzRasterLevel, tr("&New Smart Raster Level"), "");
MI_NewToonzRasterLevel, tr("&New Smart Raster Level"), "",
tr("Create a new Smart Raster level.") + separator +
tr("Smart Raster levels are color mapped making the colors easier to "
"adjust at any time."));
newToonzRasterLevelAction->setIconText(tr("New Smart Raster Level"));
newToonzRasterLevelAction->setIcon(
QIcon(":Resources/new_toonz_raster_level.svg"));
QAction *newRasterLevelAction =
createMenuLevelAction(MI_NewRasterLevel, tr("&New Raster Level"), "");
QAction *newRasterLevelAction = createMenuLevelAction(
MI_NewRasterLevel, tr("&New Raster Level"), "",
tr("Create a new raster level") + separator +
tr("Raster levels are traditonal drawing levels") + separator +
tr("Imported images will be imported as raster levels."));
newRasterLevelAction->setIconText(tr("New Raster Level"));
newRasterLevelAction->setIcon(QIcon(":Resources/new_raster_level.svg"));
QAction *loadLevelAction =
createMenuLevelAction(MI_LoadLevel, tr("&Load Level..."), "");
QAction *loadLevelAction = createMenuLevelAction(
MI_LoadLevel, tr("&Load Level..."), "", tr("Load an existing level."));
loadLevelAction->setIcon(QIcon(":Resources/load_level.svg"));
createMenuLevelAction(MI_SaveLevel, tr("&Save Level"), "");
createMenuLevelAction(MI_SaveAllLevels, tr("&Save All Levels"), "");
createMenuLevelAction(MI_SaveLevelAs, tr("&Save Level As..."), "");
createMenuLevelAction(MI_ExportLevel, tr("&Export Level..."), "");
createMenuFileAction(MI_ConvertFileWithInput, tr("&Convert File..."), "");
createRightClickMenuAction(MI_SavePaletteAs, tr("&Save Palette As..."), "");
createRightClickMenuAction(MI_OverwritePalette, tr("&Save Palette"), "");
createMenuFileAction(MI_LoadColorModel, tr("&Load Color Model..."), "");
createMenuLevelAction(MI_SaveLevel, tr("&Save Level"), "",
tr("Save the current level.") + separator +
tr("This does not save the scene info."));
createMenuLevelAction(MI_SaveAllLevels, tr("&Save All Levels"), "",
tr("Save all levels loaded into the scene.") +
separator +
tr("This does not save the scene info."));
createMenuLevelAction(MI_SaveLevelAs, tr("&Save Level As..."), "",
tr("Save the current level as a different name.") +
separator +
tr("This does not save the scene info."));
createMenuLevelAction(MI_ExportLevel, tr("&Export Level..."), "",
tr("Export the current level as an image sequence."));
createMenuFileAction(
MI_ConvertFileWithInput, tr("&Convert File..."), "",
tr("Convert an existing file or image sequnce to another format."));
createRightClickMenuAction(
MI_SavePaletteAs, tr("&Save Palette As..."), "",
tr("Save the current style palette as a separate file with a new name."));
createRightClickMenuAction(
MI_OverwritePalette, tr("&Save Palette"), "",
tr("Save the current style palette as a separate file."));
createMenuFileAction(MI_LoadColorModel, tr("&Load Color Model..."), "",
tr("Load an image as a color guide."));
createMenuFileAction(MI_ImportMagpieFile,
tr("&Import Toonz Lip Sync File..."), "");
createMenuFileAction(MI_NewProject, tr("&New Project..."), "");
tr("&Import Toonz Lip Sync File..."), "",
tr("Import a lip sync file to be applied to a level."));
createMenuFileAction(MI_NewProject, tr("&New Project..."), "",
tr("Create a new project.") + separator +
tr("A project is a container for a collection of "
"related scenes and drawings."));
// createMenuFileAction(MI_ProjectSettings, tr("&Project Settings..."), "");
createMenuFileAction(MI_SaveDefaultSettings,
tr("&Save Project Default Settings"), "");
createMenuRenderAction(MI_OutputSettings, tr("&Output Settings..."),
"Ctrl+O");
createMenuRenderAction(MI_PreviewSettings, tr("&Preview Settings..."), "");
createMenuRenderAction(MI_Render, tr("&Save and Render"), "Ctrl+Shift+R");
createMenuRenderAction(MI_FastRender, tr("&Fast Render to MP4"), "Alt+R");
createMenuRenderAction(MI_Preview, tr("&Preview"), "Ctrl+R");
createMenuFileAction(MI_SoundTrack, tr("&Export Soundtrack"), "");
createStopMotionAction(MI_StopMotionExportImageSequence,
tr("&Export Stop Motion Image Sequence"), "");
createMenuRenderAction(MI_SavePreviewedFrames, tr("&Save Previewed Frames"),
"");
tr("&Save Project Default Settings"), "",
tr("Use the current scene's settings as a template for "
"all new scenes in the current project."));
createMenuRenderAction(
MI_OutputSettings, tr("&Output Settings..."), "Ctrl+O",
tr("Control the output settings for the current scene.") + separator +
tr("You can render from the output settings window also."));
createMenuRenderAction(
MI_PreviewSettings, tr("&Preview Settings..."), "",
tr("Control the settings that will be used to preview the scene."));
createMenuRenderAction(
MI_Render, tr("&Save and Render"), "Ctrl+Shift+R",
tr("Saves the current scene and renders according to the settings and "
"location set in Output Settings."));
createMenuRenderAction(
MI_FastRender, tr("&Fast Render to MP4"), "Alt+R",
tr("Exports an MP4 file to the location specified in the preferences.") +
separator + tr("This is quicker than going into the Output Settings "
"and setting up an MP4 render."));
createMenuRenderAction(
MI_Preview, tr("&Preview"), "Ctrl+R",
tr("Previews the current scene with all effects applied."));
createMenuFileAction(
MI_SoundTrack, tr("&Export Soundtrack"), "",
tr("Exports the soundtrack to the current scene as a wav file."));
createStopMotionAction(
MI_StopMotionExportImageSequence,
tr("&Export Stop Motion Image Sequence"), "",
tr("Exports the full resolution stop motion image sequence.") +
separator + tr("This is especially useful if using a DSLR camera."));
createMenuRenderAction(
MI_SavePreviewedFrames, tr("&Save Previewed Frames"), "",
tr("Save the images created during preview to a specified location."));
createRightClickMenuAction(MI_RegeneratePreview, tr("&Regenerate Preview"),
"");
"", tr("Recreates a set of preview images."));
createRightClickMenuAction(MI_RegenerateFramePr,
tr("&Regenerate Frame Preview"), "");
createRightClickMenuAction(MI_ClonePreview, tr("&Clone Preview"), "");
tr("&Regenerate Frame Preview"), "",
tr("Regenerate the frame preview."));
createRightClickMenuAction(MI_ClonePreview, tr("&Clone Preview"), "",
tr("Creates a clone of the previewed images."));
createRightClickMenuAction(MI_FreezePreview, tr("&Freeze//Unfreeze Preview"),
"");
"", tr("Prevent the preview from being updated."));
CommandManager::instance()->setToggleTexts(
MI_FreezePreview, tr("Freeze Preview"), tr("Unfreeze Preview"));
// createAction(MI_SavePreview, "&Save Preview", "");
createRightClickMenuAction(MI_SavePreset, tr("&Save As Preset"), "");
QAction *preferencesAction =
createMenuFileAction(MI_Preferences, tr("&Preferences..."), "Ctrl+U");
createMenuFileAction(MI_Preferences, tr("&Preferences..."), "Ctrl+U",
tr("Change Tahoma's settings."));
preferencesAction->setIcon(QIcon(":Resources/preferences.svg"));
createMenuFileAction(MI_ShortcutPopup, tr("&Configure Shortcuts..."), "");
createMenuFileAction(MI_PrintXsheet, tr("&Print Xsheet"), "");
createMenuFileAction(MI_ShortcutPopup, tr("&Configure Shortcuts..."), "",
tr("Change the shortcuts of Tahoma."));
createMenuFileAction(MI_PrintXsheet, tr("&Print Xsheet"), "",
tr("Print the scene's exposure sheet."));
createMenuFileAction(MI_ExportXDTS,
tr("Export Exchange Digital Time Sheet (XDTS)"), "");
createMenuFileAction("MI_RunScript", tr("Run Script..."), "");
createMenuFileAction("MI_OpenScriptConsole", tr("Open Script Console..."),
"");
createMenuFileAction(
"MI_RunScript", tr("Run Script"), "",
tr("Run a script to perform a series of actions on a scene."));
createMenuFileAction(
"MI_OpenScriptConsole", tr("Open Script Console"), "",
tr("Open a console window where you can enter script commands."));
createMenuFileAction(MI_Print, tr("&Print Current Frame..."), "Ctrl+P");
createMenuFileAction(MI_Quit, tr("&Quit"), "Ctrl+Q");
createMenuFileAction(MI_Quit, tr("&Quit"), "Ctrl+Q", tr("Bye."));
#ifndef NDEBUG
createMenuFileAction("MI_ReloadStyle", tr("Reload qss"), "");
#endif

View file

@ -552,6 +552,14 @@ void PreferencesPopup::onTranspCheckDataChanged() { invalidateIcons(); }
//-----------------------------------------------------------------------------
void PreferencesPopup::onUseThemeViewerColorsChanged() {
bool enable = m_pref->getBoolValue(useThemeViewerColors);
m_controlIdMap.key(viewerBGColor)->setEnabled(!enable);
m_controlIdMap.key(previewBGColor)->setEnabled(!enable);
}
//-----------------------------------------------------------------------------
void PreferencesPopup::onSVNEnabledChanged() {
if (m_pref->getBoolValue(SVNEnabled)) {
if (!VersionControl::instance()->testSetup())
@ -1074,6 +1082,8 @@ QString PreferencesPopup::getUIString(PreferencesItemId id) {
// Colors
{viewerBGColor, tr("Viewer BG Color:")},
{previewBGColor, tr("Preview BG Color:")},
{useThemeViewerColors,
tr("Use the Curent Theme's Viewer Background Colors")},
{levelEditorBoxColor, tr("Level Editor Box Color:")},
{chessboardColor1, tr("Chessboard Color 1:")},
{chessboardColor2, tr("Chessboard Color 2:")},
@ -1773,7 +1783,7 @@ QWidget* PreferencesPopup::createColorsPage() {
QWidget* widget = new QWidget(this);
QGridLayout* lay = new QGridLayout();
setupLayout(lay);
insertUI(useThemeViewerColors, lay);
insertUI(viewerBGColor, lay);
insertUI(previewBGColor, lay);
insertUI(levelEditorBoxColor, lay);
@ -1798,6 +1808,16 @@ QWidget* PreferencesPopup::createColorsPage() {
&PreferencesPopup::notifySceneChanged);
m_onEditedFuncMap.insert(chessboardColor2,
&PreferencesPopup::notifySceneChanged);
m_onEditedFuncMap.insert(useThemeViewerColors,
&PreferencesPopup::onUseThemeViewerColorsChanged);
m_onEditedFuncMap.insert(useThemeViewerColors,
&PreferencesPopup::notifySceneChanged);
bool enable = m_pref->getBoolValue(useThemeViewerColors);
if (enable) {
m_controlIdMap.key(viewerBGColor)->setDisabled(true);
m_controlIdMap.key(previewBGColor)->setDisabled(true);
}
return widget;
}

View file

@ -136,6 +136,7 @@ private:
void onOnionColorChanged();
// Colors
void onTranspCheckDataChanged();
void onUseThemeViewerColorsChanged();
// Version Control
void onSVNEnabledChanged();
// Commonly used

View file

@ -1309,10 +1309,21 @@ void SceneViewer::drawBackground() {
if (m_visualSettings.m_colorMask == 0) {
TPixel32 bgColor;
if (isPreviewEnabled())
bgColor = Preferences::instance()->getPreviewBgColor();
else
bgColor = Preferences::instance()->getViewerBgColor();
if (isPreviewEnabled()) {
if (Preferences::instance()->getUseThemeViewerColors()) {
QColor qtBgColor = getPreviewBGColor();
bgColor =
TPixel32(qtBgColor.red(), qtBgColor.green(), qtBgColor.blue());
} else
bgColor = Preferences::instance()->getPreviewBgColor();
} else {
if (Preferences::instance()->getUseThemeViewerColors()) {
QColor qtBgColor = getBGColor();
bgColor =
TPixel32(qtBgColor.red(), qtBgColor.green(), qtBgColor.blue());
} else
bgColor = Preferences::instance()->getViewerBgColor();
}
glClearColor(bgColor.r / 255.0f, bgColor.g / 255.0f, bgColor.b / 255.0f,
1.0);
} else

View file

@ -68,6 +68,13 @@ class SceneViewer final : public GLWidgetForHighDpi,
public Previewer::Listener {
Q_OBJECT
Q_PROPERTY(QColor BGColor READ getBGColor WRITE setBGColor)
QColor m_bgColor;
Q_PROPERTY(
QColor PreviewBGColor READ getPreviewBGColor WRITE setPreviewBGColor)
QColor m_previewBgColor;
double m_pressure;
QPointF m_lastMousePos;
QPointF m_pos;
@ -310,6 +317,11 @@ public:
void resetNavigation();
void setBGColor(const QColor &color) { m_bgColor = color; }
QColor getBGColor() const { return m_bgColor; }
void setPreviewBGColor(const QColor &color) { m_previewBgColor = color; }
QColor getPreviewBGColor() const { return m_previewBgColor; }
public:
// SceneViewer's gadget public functions
TPointD winToWorld(const QPointF &pos) const;

View file

@ -25,10 +25,10 @@
StatusBar::StatusBar(QWidget* parent) : QStatusBar(parent) {
setObjectName("StatusBar");
m_currentFrameLabel = new QLabel(tr("Level: 1 Frame: 1"), this);
m_currentFrameLabel = new StatusLabel(tr("Level: 1 Frame: 1"), this);
m_currentFrameLabel->setObjectName("MainWindowPlainLabel");
m_infoLabel = new QLabel(tr("Info goes here."), this);
m_infoLabel = new StatusLabel(tr("Info goes here."), this);
m_infoLabel->setObjectName("MainWindowPlainLabel");
addWidget(m_infoLabel, 0);
@ -59,6 +59,10 @@ StatusBar::~StatusBar() {}
//-----------------------------------------------------------------------------
void StatusBar::showEvent(QShowEvent* event) {}
//-----------------------------------------------------------------------------
void StatusBar::updateFrameText(QString text) {
m_currentFrameLabel->setText(text);
}
@ -113,19 +117,10 @@ void StatusBar::updateInfoText() {
//-----------------------------------------------------------------------------
void StatusBar::setMessageText(QString text) {
std::string strText = text.toStdString();
QString newText = QString::fromStdString(strText);
this->showMessage("Yo", 5000);
m_infoLabel->setText(text);
}
//-----------------------------------------------------------------------------
void StatusBar::makeMap() {
QString spacer = " ";
// tools
m_infoMap.insert({"T_Hand", "Hand Tool: Pans the workspace (Space)"});
m_infoMap.insert({"T_Hand", "<b>Hand Tool:</b> Pans the workspace (Space)"});
m_infoMap.insert(
{"T_Selection",
"Selection Tool: Select parts of your image to transform it."});

View file

@ -5,11 +5,21 @@
#include <QStatusBar>;
#include <unordered_map>
#include <QLabel>
class QLabel;
// class StatusLabel;
class MainWindow;
class TXshLevel;
class StatusLabel : public QLabel {
Q_OBJECT
public:
StatusLabel(const QString& text, QWidget* parent = nullptr)
: QLabel(text, parent) {}
~StatusLabel(){};
};
//-----------------------------------------------------------------------------
class StatusBar final : public QStatusBar {
@ -20,12 +30,12 @@ public:
~StatusBar();
void setMessageText(QString text);
void updateFrameText(QString text);
protected:
QLabel *m_currentFrameLabel, *m_infoLabel; // , * m_messageLabel;
StatusLabel *m_currentFrameLabel, *m_infoLabel;
std::unordered_map<std::string, QString> m_infoMap;
void showEvent(QShowEvent*) override;
void makeMap();
protected slots:

View file

@ -49,6 +49,8 @@
#include "toonz/tcamera.h"
#include "toonz/preferences.h"
#include "toonzqt/tabbar.h"
// TnzCore includes
#include "tbigmemorymanager.h"
#include "ttoonzimage.h"
@ -741,6 +743,45 @@ bool TApp::eventFilter(QObject *watched, QEvent *e) {
}
}
}
if (watched->objectName() == "StyleEditorTabBar" &&
e->type() == QEvent::MouseMove) {
// m_statusBar->clearMessage();
DVGui::TabBar *bar = static_cast<DVGui::TabBar *>(watched);
int index = bar->tabAt(static_cast<QMouseEvent *>(e)->pos());
if (bar->tabText(index) == tr("Color")) {
// bar->setStatusTip(tr("Adjust the color value(s) of the selected
// style."));
m_statusBar->showMessage(
tr("Adjust the color value(s) of the selected style."), 0);
} else if (bar->tabText(index) == tr("Texture")) {
// bar->setStatusTip(tr("Apply a texture to the selected style. This only
// works on Vector and Smart Raster Levels. Smart Raster levels require
// preview to be on to see the style."));
m_statusBar->showMessage(
tr("Apply a texture to the selected style. This "
"only works on Vector and Smart Raster Levels. "
"Smart Raster levels require preview to be on to see the style."));
} else if (bar->tabText(index) == tr("Vector")) {
// bar->setStatusTip(tr("Apply unique strokes and fills to vector
// styles."));
m_statusBar->showMessage(
tr("Apply unique strokes and fills to vector styles."));
} else if (bar->tabText(index) == tr("Raster")) {
// bar->setStatusTip(tr("Use MyPaint brushes on Smart Raster and Raster
// levels."));
m_statusBar->showMessage(
tr("Use MyPaint brushes on Smart Raster and Raster levels."));
} else if (bar->tabText(index) == tr("Settings")) {
// bar->setStatusTip(tr("Adjust the settings depending on the style you
// have selected."));
m_statusBar->showMessage(
tr("Adjust the settings depending on the style you have selected."));
}
}
if (watched->objectName() == "StyleEditorTabBar" &&
e->type() == QEvent::Leave) {
m_statusBar->clearMessage();
}
return false; // I want just peek at the event. It must be processed anyway.
}
@ -758,7 +799,7 @@ void TApp::setStatusBarFrameInfo(QString text) {
//-----------------------------------------------------------------------------
void TApp::showMessage(QString message) {
if (m_statusBar) m_statusBar->setMessageText(message);
if (m_statusBar) m_statusBar->showMessage(message, 2000);
}
//-----------------------------------------------------------------------------

View file

@ -227,7 +227,13 @@ void ViewerDraw::drawCameraMask(SceneViewer *viewer) {
}
// set the camera mask color same as the previewBG color
TPixel32 maskColor = Preferences::instance()->getPreviewBgColor();
TPixel32 maskColor;
if (Preferences::instance()->getUseThemeViewerColors()) {
QColor qtMaskColor = viewer->getPreviewBGColor();
maskColor =
TPixel32(qtMaskColor.red(), qtMaskColor.green(), qtMaskColor.blue());
} else
maskColor = Preferences::instance()->getPreviewBgColor();
double mask_r, mask_g, mask_b;
mask_r = (double)maskColor.r / 255.0;
mask_g = (double)maskColor.g / 255.0;

View file

@ -132,6 +132,7 @@ SceneViewerPanel::SceneViewerPanel(QWidget *parent, Qt::WFlags flags)
m_flipConsole =
new FlipConsole(mainLayout, buttonMask, false, m_keyFrameButton,
"SceneViewerConsole", this, true);
mainLayout->addWidget(m_flipConsole);
m_flipConsole->enableButton(FlipConsole::eMatte, false, false);
m_flipConsole->enableButton(FlipConsole::eSave, false, false);
@ -625,7 +626,7 @@ void SceneViewerPanel::changeWindowTitle() {
m_sceneViewer->getNormalZoomScale().inv();
if (m_sceneViewer->getIsFlippedX()) aff = aff * TScale(-1, 1);
if (m_sceneViewer->getIsFlippedY()) aff = aff * TScale(1, -1);
name = name + tr(" :: Zoom : ") +
name = name + tr(" :: Zoom : ") +
QString::number(tround(100.0 * sqrt(aff.det()))) + "%";
if (m_sceneViewer->getIsFlippedX() || m_sceneViewer->getIsFlippedY()) {
name = name + tr(" (Flipped)");
@ -653,7 +654,7 @@ void SceneViewerPanel::changeWindowTitle() {
m_sceneViewer->getNormalZoomScale().inv();
if (m_sceneViewer->getIsFlippedX()) aff = aff * TScale(-1, 1);
if (m_sceneViewer->getIsFlippedY()) aff = aff * TScale(1, -1);
name = name + tr(" :: Zoom : ") +
name = name + tr(" :: Zoom : ") +
QString::number(tround(100.0 * sqrt(aff.det()))) + "%";
if (m_sceneViewer->getIsFlippedX() || m_sceneViewer->getIsFlippedY()) {
name = name + tr(" (Flipped)");

View file

@ -555,6 +555,7 @@ void Preferences::definePreferenceItems() {
QColor(128, 128, 128));
define(previewBGColor, "previewBGColor", QMetaType::QColor,
QColor(64, 64, 64));
define(useThemeViewerColors, "useThemeViewerColors", QMetaType::Bool, true);
define(levelEditorBoxColor, "levelEditorBoxColor", QMetaType::QColor,
QColor(128, 128, 128));
define(chessboardColor1, "chessboardColor1", QMetaType::QColor,

View file

@ -476,17 +476,12 @@ void TabBarContainter::paintEvent(QPaintEvent *event) {
ToolBarContainer::ToolBarContainer(QWidget *parent) : QFrame(parent) {
setObjectName("ToolBarContainer");
setFrameStyle(QFrame::StyledPanel);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
}
//-----------------------------------------------------------------------------
void ToolBarContainer::paintEvent(QPaintEvent *event) {
QPainter p(this);
p.setPen(QColor(120, 120, 120));
p.drawLine(0, 0, width(), 0);
}
void ToolBarContainer::paintEvent(QPaintEvent *event) {}
//=============================================================================

View file

@ -1379,6 +1379,9 @@ bool PageViewer::event(QEvent *e) {
}
}
}
if (indexInPage == m_page->getStyleCount()) {
toolTip = tr("New Style");
}
if (toolTip != "")
QToolTip::showText(helpEvent->globalPos(), toolTip);
else

View file

@ -11,7 +11,7 @@ using namespace DVGui;
// TabBar
//-----------------------------------------------------------------------------
TabBar::TabBar(QWidget *parent) : QTabBar(parent) {}
TabBar::TabBar(QWidget *parent) : QTabBar(parent) { setMouseTracking(true); }
//-----------------------------------------------------------------------------