forked from qt-creator/qt-creator
AutoTest: Add some theming support for results pane
Change-Id: I6641dc92d54ea20263656fa77157d7d853cf0287 Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -113,6 +113,14 @@ OutputPanes_NormalMessageTextColor=text
|
|||||||
OutputPanes_StdErrTextColor=ffff6666
|
OutputPanes_StdErrTextColor=ffff6666
|
||||||
OutputPanes_StdOutTextColor=text
|
OutputPanes_StdOutTextColor=text
|
||||||
OutputPanes_WarningMessageTextColor=fff3c300
|
OutputPanes_WarningMessageTextColor=fff3c300
|
||||||
|
OutputPanes_TestPassTextColor=ff00b400
|
||||||
|
OutputPanes_TestFailTextColor=ffc82828
|
||||||
|
OutputPanes_TestXFailTextColor=ff28dc28
|
||||||
|
OutputPanes_TestXPassTextColor=ffdc2828
|
||||||
|
OutputPanes_TestSkipTextColor=ff828282
|
||||||
|
OutputPanes_TestWarnTextColor=ffc8c800
|
||||||
|
OutputPanes_TestFatalTextColor=ffb42828
|
||||||
|
OutputPanes_TestDebugTextColor=ff329696
|
||||||
OutputPaneButtonFlashColor=error
|
OutputPaneButtonFlashColor=error
|
||||||
OutputPaneToggleButtonTextColorChecked=text
|
OutputPaneToggleButtonTextColorChecked=text
|
||||||
OutputPaneToggleButtonTextColorUnchecked=text
|
OutputPaneToggleButtonTextColorUnchecked=text
|
||||||
|
|||||||
@@ -115,6 +115,14 @@ OutputPanes_NormalMessageTextColor=ff0000aa
|
|||||||
OutputPanes_StdErrTextColor=ffaa0000
|
OutputPanes_StdErrTextColor=ffaa0000
|
||||||
OutputPanes_StdOutTextColor=ff000000
|
OutputPanes_StdOutTextColor=ff000000
|
||||||
OutputPanes_WarningMessageTextColor=ff808000
|
OutputPanes_WarningMessageTextColor=ff808000
|
||||||
|
OutputPanes_TestPassTextColor=ff009900
|
||||||
|
OutputPanes_TestFailTextColor=ffa00000
|
||||||
|
OutputPanes_TestXFailTextColor=ff28f028
|
||||||
|
OutputPanes_TestXPassTextColor=fff02828
|
||||||
|
OutputPanes_TestSkipTextColor=ff787878
|
||||||
|
OutputPanes_TestWarnTextColor=ffd0bb00
|
||||||
|
OutputPanes_TestFatalTextColor=ff640000
|
||||||
|
OutputPanes_TestDebugTextColor=ff329696
|
||||||
OutputPaneButtonFlashColor=ffff0000
|
OutputPaneButtonFlashColor=ffff0000
|
||||||
OutputPaneToggleButtonTextColorChecked=toolBarItem
|
OutputPaneToggleButtonTextColorChecked=toolBarItem
|
||||||
OutputPaneToggleButtonTextColorUnchecked=toolBarItem
|
OutputPaneToggleButtonTextColorUnchecked=toolBarItem
|
||||||
|
|||||||
@@ -107,6 +107,14 @@ OutputPanes_NormalMessageTextColor=ff0000aa
|
|||||||
OutputPanes_StdErrTextColor=ffaa0000
|
OutputPanes_StdErrTextColor=ffaa0000
|
||||||
OutputPanes_StdOutTextColor=ff000000
|
OutputPanes_StdOutTextColor=ff000000
|
||||||
OutputPanes_WarningMessageTextColor=ff808000
|
OutputPanes_WarningMessageTextColor=ff808000
|
||||||
|
OutputPanes_TestPassTextColor=ff009900
|
||||||
|
OutputPanes_TestFailTextColor=ffa00000
|
||||||
|
OutputPanes_TestXFailTextColor=ff28f028
|
||||||
|
OutputPanes_TestXPassTextColor=fff02828
|
||||||
|
OutputPanes_TestSkipTextColor=ff787878
|
||||||
|
OutputPanes_TestWarnTextColor=ffd0bb00
|
||||||
|
OutputPanes_TestFatalTextColor=ff640000
|
||||||
|
OutputPanes_TestDebugTextColor=ff329696
|
||||||
OutputPaneButtonFlashColor=ffff0000
|
OutputPaneButtonFlashColor=ffff0000
|
||||||
OutputPaneToggleButtonTextColorChecked=ffffffff
|
OutputPaneToggleButtonTextColorChecked=ffffffff
|
||||||
OutputPaneToggleButtonTextColorUnchecked=ff000000
|
OutputPaneToggleButtonTextColorUnchecked=ff000000
|
||||||
|
|||||||
@@ -160,6 +160,14 @@ public:
|
|||||||
OutputPanes_StdErrTextColor,
|
OutputPanes_StdErrTextColor,
|
||||||
OutputPanes_StdOutTextColor,
|
OutputPanes_StdOutTextColor,
|
||||||
OutputPanes_WarningMessageTextColor,
|
OutputPanes_WarningMessageTextColor,
|
||||||
|
OutputPanes_TestPassTextColor,
|
||||||
|
OutputPanes_TestFailTextColor,
|
||||||
|
OutputPanes_TestXFailTextColor,
|
||||||
|
OutputPanes_TestXPassTextColor,
|
||||||
|
OutputPanes_TestSkipTextColor,
|
||||||
|
OutputPanes_TestWarnTextColor,
|
||||||
|
OutputPanes_TestFatalTextColor,
|
||||||
|
OutputPanes_TestDebugTextColor,
|
||||||
|
|
||||||
/* Debugger Log Window */
|
/* Debugger Log Window */
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "testresult.h"
|
#include "testresult.h"
|
||||||
|
|
||||||
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
namespace Autotest {
|
namespace Autotest {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -119,29 +121,28 @@ QColor TestResult::colorForType(const Result::Type type)
|
|||||||
if (type >= Result::INTERNAL_MESSAGES_BEGIN && type <= Result::INTERNAL_MESSAGES_END)
|
if (type >= Result::INTERNAL_MESSAGES_BEGIN && type <= Result::INTERNAL_MESSAGES_END)
|
||||||
return QColor("transparent");
|
return QColor("transparent");
|
||||||
|
|
||||||
|
Utils::Theme *creatorTheme = Utils::creatorTheme();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Result::Pass:
|
case Result::Pass:
|
||||||
return QColor("#009900");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestPassTextColor);
|
||||||
case Result::Fail:
|
case Result::Fail:
|
||||||
return QColor("#a00000");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestFailTextColor);
|
||||||
case Result::ExpectedFail:
|
case Result::ExpectedFail:
|
||||||
return QColor("#00ff00");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestXFailTextColor);
|
||||||
case Result::UnexpectedPass:
|
case Result::UnexpectedPass:
|
||||||
return QColor("#ff0000");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestXPassTextColor);
|
||||||
case Result::Skip:
|
case Result::Skip:
|
||||||
return QColor("#787878");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestSkipTextColor);
|
||||||
case Result::BlacklistedPass:
|
|
||||||
return QColor(0, 0, 0);
|
|
||||||
case Result::BlacklistedFail:
|
|
||||||
return QColor(0, 0, 0);
|
|
||||||
case Result::MessageDebug:
|
case Result::MessageDebug:
|
||||||
return QColor("#329696");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestDebugTextColor);
|
||||||
case Result::MessageWarn:
|
case Result::MessageWarn:
|
||||||
return QColor("#d0bb00");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestWarnTextColor);
|
||||||
case Result::MessageFatal:
|
case Result::MessageFatal:
|
||||||
return QColor("#640000");
|
return creatorTheme->color(Utils::Theme::OutputPanes_TestFatalTextColor);
|
||||||
|
case Result::BlacklistedPass:
|
||||||
|
case Result::BlacklistedFail:
|
||||||
default:
|
default:
|
||||||
return QColor("#000000");
|
return creatorTheme->color(Utils::Theme::OutputPanes_StdOutTextColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user