[win-nix] restyling. use colored tabs

This commit is contained in:
Maxim Kadushkin
2018-07-16 14:06:28 +03:00
parent f699eb8bae
commit 55f9b7aeb2
76 changed files with 279 additions and 266 deletions

View File

@ -29,6 +29,8 @@ SOURCES += \
RC_FILE = $$PWD/version.rc
DEFINES += __DONT_WRITE_IN_APP_TITLE
linux-g++ {
LIBS += -L$$PWD/$$CORE_LIB_PATH/lib/$$PLATFORM_BUILD -lascdocumentscore -lhunspell -looxmlsignature
DEFINES += LINUX _LINUX _LINUX_QT _GLIBCXX_USE_CXX11_ABI=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

View File

@ -0,0 +1,8 @@
<svg width="15px" height="15px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling" style="animation-play-state: running; animation-delay: 0s; background: none;">
<circle id="dark" cx="50" cy="50" fill="none" stroke="#444" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(234 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animateTransform>
</circle>
<circle id="light" cx="50" cy="50" fill="none" stroke="#fff" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(234 50 50)" style="animation-play-state: running; animation-delay: 0s;">
<animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite" style="animation-play-state: running; animation-delay: 0s;"></animateTransform>
</circle>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

View File

@ -4,11 +4,11 @@
}
#centralWidget {
background: #313437;
background: #f1f1f1;
}
#labelAppTitle {
color: #fff;
color: #444;
margin-top: -2px;
font-size: 11px;
}
@ -22,15 +22,15 @@ QPushButton#toolButtonMaximize, QPushButton#toolButtonMain,
border-radius:0;
}
QPushButton#toolButtonMaximize,QPushButton#toolButtonMinimize,
QPushButton#toolButtonClose, QPushButton#toolButtonDownload {
background-origin: content;
padding: 6px;
QPushButton#toolButtonDownload {
background-origin: content;
padding: 6px;
}
QPushButton#toolButtonDownload {
/*background-color:#f00;*/
QPushButton#toolButtonMaximize,QPushButton#toolButtonMinimize,
QPushButton#toolButtonClose {
background-origin: content;
padding: 5px 12px 7px;
}
QPushButton[act=tool] {
@ -39,11 +39,19 @@ QPushButton[act=tool] {
}
QPushButton[act=tool]:hover {
background-color:#60656a;
background-color:#cecece;
}
QPushButton[act=tool]:pressed {
background-color:#1f2123;
background-color:#b7b7b7;
}
QPushButton#toolButtonClose:hover {
background-color:#d42b2b;
}
QPushButton#toolButtonClose:pressed {
background-color:#d75050;
}
QPushButton#toolButtonMaximize {
@ -74,7 +82,7 @@ QPushButton#toolButtonMinimize, QPushButton#toolButtonClose {
}
QPushButton#toolButtonMinimize[class=normal] {
background-position: left top;
background-position: left top;
}
QPushButton#toolButtonMinimize[class=normal]:hover,
@ -96,6 +104,7 @@ QPushButton#toolButtonMain {
font-size: 10px;
font-family: 'Open Sans',sans-serif;
font-weight: bold;
border-right: 1px solid #a5a5a5;
}
QPushButton#toolButtonMain[theme=light] {
@ -113,8 +122,16 @@ QPushButton#toolButtonMain[class=normal],
QPushButton#toolButtonMain[class=normal]:hover
{
color: #fff;
background: #60656a;
border-bottom: 1px solid #4f5458;
border-bottom: 0 none;
}
QPushButton#toolButtonMain[class=normal]
{
background: #f1f1f1;
}
QPushButton#toolButtonMain[class=normal]:hover {
background: #cecece;
}
QPushButton#toolButtonMain[class=normal][theme=light],
@ -124,10 +141,6 @@ QPushButton#toolButtonMain[class=normal][theme=light],
border-bottom: 1px solid #b6b6b6;
}
QPushButton#toolButtonMain[class=normal]:hover {
background: #696e74;
}
QPushButton::menu-indicator {
/*border: 1px solid white;*/
width: 10px;
@ -175,6 +188,10 @@ QTabBar::tab {
/*padding-right: 2px;*/
}
QTabBar::tab::selected {
padding-left: 0px;
}
QTabBar::tear { width: 0px; }
QTabBar::tab:first { }
QTabBar::tab:only-one { }
@ -198,42 +215,51 @@ QTabBar::close-button:pressed {
QTabBar QToolButton,
QTabBar QToolButton:disabled {
/*margin-right:-1px;*/
background-color:#cfcfcf;
border:1px solid #afb0b1;
/*border-top: 0 none;*/
background-color:#f1f1f1;
border:0 none;
width: 40px;
}
QTabBar QToolButton:hover {
background-color:#ddd;
border-color:#afb0b1;
background-color:#cecece;
}
QTabBar QToolButton:pressed {
background-color:#b7b7b7;
}
QTabBar QToolButton::left-arrow {
border-image: url(:/res/icons/changetab_left_normal.png) 0;
border-top-width: 7px;
border-bottom-width: 7px;
border-image: url(:/tabbar/icons/scrolltab_ln.png) 0 0 0 0 repeat;
border-width: 8px 0 8px 1px;
}
QTabBar QToolButton::left-arrow:disabled {
border-image: url(:/res/icons/changetab_left_disabled.png) 0;
border-image: url(:/tabbar/icons/scrolltab_ld.png) 0 0 0 0 repeat;
}
QTabBar QToolButton::left-arrow:hover {}
QTabBar QToolButton::left-arrow:pressed {}
QTabBar QToolButton::left-arrow:hover {
border-image: url(:/tabbar/icons/scrolltab_lh.png) 0 0 0 0 repeat;
}
QTabBar QToolButton::left-arrow:pressed {
border-image: url(:/tabbar/icons/scrolltab_lp.png) 0 0 0 0 repeat;
}
QTabBar QToolButton::right-arrow {
border-image: url(:/res/icons/changetab_right_normal.png) 0;
border-top-width: 7px;
border-bottom-width: 7px;
border-image: url(:/tabbar/icons/scrolltab_rn.png) 0 0 0 0 repeat;
border-width: 8px 0 8px 3px;
}
QTabBar QToolButton::right-arrow:disabled {
border-image: url(:/res/icons/changetab_right_disabled.png) 0;
border-image: url(:/tabbar/icons/scrolltab_rd.png) 0 0 0 0 repeat;
}
QTabBar QToolButton::right-arrow:hover {}
QTabBar QToolButton::right-arrow:pressed {}
QTabBar QToolButton::right-arrow:hover {
border-image: url(:/tabbar/icons/scrolltab_rh.png) 0 0 0 0 repeat;
}
QTabBar QToolButton::right-arrow:pressed {
border-image: url(:/tabbar/icons/scrolltab_rp.png) 0 0 0 0 repeat;
}
QTabBar::scroller {
/*padding-left: 0px;*/
@ -242,10 +268,29 @@ QTabBar::scroller {
width:16px;
}
/*QTabBar::scroller { width:24px; }*/
QLabel[class=tab-icon] {
padding:0 0 0 3px;
padding:0 0 2px 4px;
}
QTabBar QToolButton[class=tab-close]{
background-image:url(:/tabbar/icons/close_normal.png);
}
QTabBar QToolButton[class=tab-close][state=active]{
background-image:url(:/tabbar/icons/close_active.png);
}
QTabBar QToolButton[class=tab-close]:hover{
background-position:right top;
}
QTabBar QToolButton[class=tab-close]:pressed{
background-position:left bottom;
}
QTabBar QToolButton[class=tab-close]{
background-color:rgba(255,255,255,0);
}
/*MyLabel { qproperty-pixmap: url(pixmap.png); }*/
/*MyGroupBox { qproperty-titleColor: rgb(100, 200, 100); }*/

View File

@ -4,9 +4,13 @@
font-size: 22px;
}
QPushButton#toolButtonDownload {
padding: 12px;
}
QPushButton#toolButtonMaximize,QPushButton#toolButtonMinimize,
QPushButton#toolButtonClose, QPushButton#toolButtonDownload {
padding: 12px;
QPushButton#toolButtonClose {
padding: 10px 24px 14px;
}
QPushButton#toolButtonMaximize {
@ -18,8 +22,8 @@ QPushButton#toolButtonMinimize, QPushButton#toolButtonClose {
}
QPushButton#toolButtonMain {
/*background-image:url(:/res/icons/mainpage_2x.png);*/
font-size: 20px;
border-right-width: 2px;
}
QPushButton#toolButtonMain[theme=light] {
@ -70,6 +74,10 @@ QTabBar::tab {
padding-left: 14px;
}
QTabBar::tab {
padding: 0;
}
QTabBar::close-button {
image: url(:/res/icons/tab_close_normal_2x.png);
/*border-image: none;*/
@ -93,28 +101,46 @@ QTabBar QToolButton,
}
QTabBar QToolButton::left-arrow {
border-image: url(:/res/icons/changetab_left_normal_2x.png) 0;
border-top-width: 14px;
border-bottom-width: 14px;
border-image: url(:/tabbar/icons/scrolltab_ln_2x.png) 0;
border-width:12px;
border-top-width:16px;
border-bottom-width:16px;
}
QTabBar QToolButton::left-arrow:disabled {
border-image: url(:/res/icons/changetab_left_disabled_2x.png) 0;
border-image: url(:/tabbar/icons/scrolltab_ld_2x.png) 0;
}
QTabBar QToolButton::left-arrow:hover {
border-image: url(:/tabbar/icons/scrolltab_lh_2x.png) 0;
}
QTabBar QToolButton::left-arrow:pressed {
border-image: url(:/tabbar/icons/scrolltab_lp_2x.png) 0;
}
QTabBar QToolButton::right-arrow {
border-image: url(:/res/icons/changetab_right_normal_2x.png) 0;
border-top-width: 14px;
border-bottom-width: 14px;
border-image: url(:/tabbar/icons/scrolltab_rn_2x.png) 0;
border-width:12px;
border-top-width:16px;
border-bottom-width:16px;
}
QTabBar QToolButton::right-arrow:disabled {
border-image: url(:/res/icons/changetab_right_disabled_2x.png) 0;
border-image: url(:/tabbar/icons/scrolltab_rd_2x.png) 0;
}
QTabBar QToolButton::right-arrow:hover {
border-image: url(:/tabbar/icons/scrolltab_rh_2x.png) 0;
}
QTabBar QToolButton::right-arrow:pressed {
border-image: url(:/tabbar/icons/scrolltab_rp_2x.png) 0;
}
QTabBar::scroller {
width:32px;
}
QTabBar::scroller { width:48px; }
/* download widget */
QMenu[hdpi]#menuButtonDownload {
@ -154,5 +180,15 @@ QDialog QPushButton {
}
QLabel[class=tab-icon] {
padding:0 0 2px 8px;
padding:0 0 4px 12px;
}
QTabBar QToolButton[class=tab-close]{
background-image:url(:/tabbar/icons/close_normal_2x.png);
}
QTabBar QToolButton[class=tab-close][state=active]{
background-image:url(:/tabbar/icons/close_active_2x.png);
}
QTabBar QToolButton[class=tab-close]:hover{
border-right:2px solid #fff; /* ??? pixmap offsets on hover for 2px ??? */
}

View File

@ -1,14 +1,15 @@
/* styles for a frameless main window */
QTabWidget::pane {background-color: #313437; border:none;}
QTabWidget::tab-bar {width: auto; height: 29px; left: 70px; }
QTabWidget::pane {background-color: #f1f1f1; border:none;}
QTabWidget::tab-bar {width: auto; height: 28px; left: 112px; }
QTabBar::tab { width:135px; background-color: #CFCFCF; border: 0 none; min-width: 41px; max-width: 135px;
height: 27px; margin: 0 1px 0 0; }
QTabBar::tab { width:135px; background-color: #f1f1f1; border: 0 none; min-width: 41px; max-width: 135px;
height: 28px; margin: 0 0 0 0; }
QTabBar::tab {border-bottom:1px solid #afb0b1; border-top:1px solid #cfcfcf;}
QTabBar::tab {border-right: 1px solid #a5a5a5;}
QTabBar::tab:hover{background-color: #cecece;}
QTabBar::tab:selected{background-color: #515252;}
QTabBar::tab-label{active:#fff;normal:#444;}
QTabBar::tab-icon{width:15;height:15;}
QTabBar::tab:hover {background-color: #ddd; border-top-color:#ddd;}
QTabBar::tab:selected {background-color: #f1f1f1; border-color: #f1f1f1;}
QTabWidget[active=false] QTabBar::tab:selected {background-color: #cfcfcf; border-color: #cfcfcf; border-bottom-color:#afb0b1;}
QTabWidget[active=false] QTabBar::tab:selected:hover {background-color: #ddd;}
QTabWidget[active=false] QTabBar::tab:selected {background-color: #f1f1f1;}
QTabWidget[active=false] QTabBar::tab:selected:hover {background-color: #cecece;}

View File

@ -1,14 +1,15 @@
QTabWidget::pane { background-color: #313437; border:none; }
QTabWidget::tab-bar {width: auto; height: 58px; left: 140px; }
QTabWidget::pane {background-color: #f1f1f1; border:none;}
QTabWidget::tab-bar {width: auto; height: 56px; left: 224px; }
QTabBar::tab { width:270px; background-color: #CFCFCF; border: 0 none; min-width: 82px; max-width: 270px;
height: 54px; margin: 0 2px 0 0;}
QTabBar::tab { width:270px; background-color: #f1f1f1; border: 0 none; min-width: 82px; max-width: 270px;
height: 56px; margin: 0 0 0 0; }
QTabBar::tab {border-bottom:2px solid #afb0b1; border-top:2px solid #cfcfcf;}
QTabBar::tab {border-right: 2px solid #a5a5a5;}
QTabBar::tab:hover{background-color: #cecece;}
QTabBar::tab:selected{background-color: #515252;}
QTabBar::tab-label{active:#fff;normal:#444;}
QTabBar::tab-icon{width:15;height:15;}
QTabBar::tab:hover {background-color: #DDD; border-top-color:#ddd;}
QTabBar::tab:selected {background-color: #F1F1F1; border-color: #F1F1F1; }
QTabWidget[active=false] QTabBar::tab:selected { background-color: #CFCFCF; border-color: #CFCFCF;border-bottom-color:#afb0b1;}
QTabWidget[active=false] QTabBar::tab:selected:hover {background-color:#ddd;}
QTabWidget[active=false] QTabBar::tab:selected {background-color: #f1f1f1;}
QTabWidget[active=false] QTabBar::tab:selected:hover {background-color: #cecece;}

View File

@ -6,30 +6,6 @@
<file>res/icons/tab_close_active_2x.png</file>
<file>res/icons/tab_close_hover.png</file>
<file>res/icons/tab_close_hover_2x.png</file>
<file alias="de_active.png">res/icons/tabicon_de_active.png</file>
<file alias="de_active@2x.png">res/icons/tabicon_de_active_2x.png</file>
<file alias="de_normal.png">res/icons/tabicon_de_normal.png</file>
<file alias="de_normal@2x.png">res/icons/tabicon_de_normal_2x.png</file>
<file alias="pe_active.png">res/icons/tabicon_pe_active.png</file>
<file alias="pe_active@2x.png">res/icons/tabicon_pe_active_2x.png</file>
<file alias="pe_normal.png">res/icons/tabicon_pe_normal.png</file>
<file alias="pe_normal@2x.png">res/icons/tabicon_pe_normal_2x.png</file>
<file alias="se_active.png">res/icons/tabicon_se_active.png</file>
<file alias="se_active@2x.png">res/icons/tabicon_se_active_2x.png</file>
<file alias="se_normal.png">res/icons/tabicon_se_normal.png</file>
<file alias="se_normal@2x.png">res/icons/tabicon_se_normal_2x.png</file>
<file alias="portal.png">res/icons/tabicon_portal.png</file>
<file alias="portal@2x.png">res/icons/tabicon_portal_2x.png</file>
<file alias="newdocument.png">res/icons/tabicon_opening.png</file>
<file alias="newdocument@2x.png">res/icons/tabicon_opening_2x.png</file>
<file>res/icons/changetab_left_normal.png</file>
<file>res/icons/changetab_left_normal_2x.png</file>
<file>res/icons/changetab_left_disabled.png</file>
<file>res/icons/changetab_left_disabled_2x.png</file>
<file>res/icons/changetab_right_normal.png</file>
<file>res/icons/changetab_right_normal_2x.png</file>
<file>res/icons/changetab_right_disabled.png</file>
<file>res/icons/changetab_right_disabled_2x.png</file>
<file>res/icons/message_icons.png</file>
<file>res/icons/message_icons_2x.png</file>
<file>res/icons/downloading.gif</file>
@ -47,6 +23,41 @@
<file alias="app.ico">res/icons/desktopeditors.ico</file>
<file>res/icons/splash.png</file>
<file>res/icons/splash_2x.png</file>
<file alias="logo.png">res/icons/logo.png</file>
<file alias="logo@2x.png">res/icons/logo_2x.png</file>
</qresource>
<qresource prefix="/tabbar/icons">
<file alias="scrolltab_lp.png">res/icons/tabbar/changetab_left_active.png</file>
<file alias="scrolltab_lp_2x.png">res/icons/tabbar/changetab_left_active@2x.png</file>
<file alias="scrolltab_ld.png">res/icons/tabbar/changetab_left_disabled.png</file>
<file alias="scrolltab_ld_2x.png">res/icons/tabbar/changetab_left_disabled@2x.png</file>
<file alias="scrolltab_lh.png">res/icons/tabbar/changetab_left_hover.png</file>
<file alias="scrolltab_lh_2x.png">res/icons/tabbar/changetab_left_hover@2x.png</file>
<file alias="scrolltab_ln.png">res/icons/tabbar/changetab_left_normal.png</file>
<file alias="scrolltab_ln_2x.png">res/icons/tabbar/changetab_left_normal@2x.png</file>
<file alias="scrolltab_rp.png">res/icons/tabbar/changetab_right_active.png</file>
<file alias="scrolltab_rp_2x.png">res/icons/tabbar/changetab_right_active@2x.png</file>
<file alias="scrolltab_rd.png">res/icons/tabbar/changetab_right_disabled.png</file>
<file alias="scrolltab_rd_2x.png">res/icons/tabbar/changetab_right_disabled@2x.png</file>
<file alias="scrolltab_rh.png">res/icons/tabbar/changetab_right_hover.png</file>
<file alias="scrolltab_rh_2x.png">res/icons/tabbar/changetab_right_hover@2x.png</file>
<file alias="scrolltab_rn.png">res/icons/tabbar/changetab_right_normal.png</file>
<file alias="scrolltab_rn_2x.png">res/icons/tabbar/changetab_right_normal@2x.png</file>
<file alias="de.png">res/icons/tabbar/tabicon_de_normal.png</file>
<file alias="de@2x.png">res/icons/tabbar/tabicon_de_normal_2x.png</file>
<file alias="pe.png">res/icons/tabbar/tabicon_pe_normal.png</file>
<file alias="pe@2x.png">res/icons/tabbar/tabicon_pe_normal_2x.png</file>
<file alias="se.png">res/icons/tabbar/tabicon_se_normal.png</file>
<file alias="se@2x.png">res/icons/tabbar/tabicon_se_normal_2x.png</file>
<file alias="portal.png">res/icons/tabbar/portal.png</file>
<file alias="portal@2x.png">res/icons/tabbar/portal@2x.png</file>
<file alias="newdoc.png">res/icons/tabbar/tabicon_undefined.png</file>
<file alias="newdoc@2x.png">res/icons/tabbar/tabicon_undefined_2x.png</file>
<file alias="loader.svg">res/icons/tabbar/loading.svg</file>
<file alias="close_normal.png">res/icons/tabbar/tab_close_dark.png</file>
<file alias="close_normal_2x.png">res/icons/tabbar/tab_close_dark_2x.png</file>
<file alias="close_active.png">res/icons/tabbar/tab_close_light.png</file>
<file alias="close_active_2x.png">res/icons/tabbar/tab_close_light_2x.png</file>
</qresource>
<qresource prefix="/styles">
<file>res/styles/styles.qss</file>

View File

@ -220,10 +220,7 @@ int CAscTabWidget::addEditor(COpenOptions& opts)
pView->setData(data);
tab_index = addTab(pView, opts.name);
tabBar()->setTabToolTip(tab_index, opts.name);
#ifdef __APP_NEW_APPEARANCE
((CTabBar *)tabBar())->tabStartLoading(tab_index);
#endif
//TODO: test for safe remove
// applyDocumentChanging(id_view, opts.type);
@ -305,11 +302,8 @@ int CAscTabWidget::addPortal(QString url, QString name)
tab_index = insertTab(tab_index, pView, portal);
tabBar()->setTabToolTip(tab_index, url);
#ifdef __APP_NEW_APPEARANCE
((CTabBar *)tabBar())->setTabTheme(tab_index, CTabBar::Light);
((CTabBar *)tabBar())->tabStartLoading(tab_index);
#endif
// updateTabIcon(tabIndexByView(id));
@ -343,11 +337,8 @@ int CAscTabWidget::addOAuthPortal(const QString& portal, const QString& type, c
tab_index = insertTab(tab_index, pView, _portal);
tabBar()->setTabToolTip(tab_index, portal);
#ifdef __APP_NEW_APPEARANCE
((CTabBar *)tabBar())->setTabTheme(tab_index, CTabBar::Light);
((CTabBar *)tabBar())->tabStartLoading(tab_index);
#endif
return tab_index;
}
@ -486,55 +477,40 @@ void CAscTabWidget::updateTabIcon(int index)
if (pEditor) {
bool is_active = isActive() && index == currentIndex();
int tab_type = etUndefined;
#ifdef __USE_COLORED_TAB
QString _color = "none";
CTabBar::TabTheme _theme = is_active ? CTabBar::Dark : CTabBar::Light;
#endif
QString tab_color = "none";
CTabBar::TabTheme tab_theme = is_active ? CTabBar::Dark : CTabBar::Light;
if (pEditor->GetType() == cvwtSimple) {
tab_type = etPortal;
#ifdef __USE_COLORED_TAB
_color = "#fff";
_theme = CTabBar::Light;
#endif
tab_color = "#fff";
tab_theme = CTabBar::Light;
} else {
tab_type = pEditor->GetEditorType();
switch ( tab_type ) {
#ifdef __USE_COLORED_TAB
case etPresentation: _color = TAB_COLOR_PRESENTATION; break;
case etSpreadsheet: _color = TAB_COLOR_SPREADSHEET; break;
case etDocument: _color = TAB_COLOR_DOCUMENT; break;
case etPresentation: tab_color = TAB_COLOR_PRESENTATION; break;
case etSpreadsheet: tab_color = TAB_COLOR_SPREADSHEET; break;
case etDocument: tab_color = TAB_COLOR_DOCUMENT; break;
default:
tab_type = etUndefined;
_theme = CTabBar::Light;
_color = "#fff";
tab_theme = CTabBar::Light;
tab_color = "#fff";
break;
#else
case etPresentation:
case etSpreadsheet:
case etDocument: break;
default: tab_type = etUndefined; break;
#endif
}
}
QString icon_name = is_active ? m_mapTabIcons.at(tab_type).second : m_mapTabIcons.at(tab_type).first;
((CTabBar *)tabBar())->setTabIcon(index, QIcon(icon_name));
#ifdef __USE_COLORED_TAB
// ((CTabBar *)tabBar())->changeTabTheme(index, _theme);
((CTabBar *)tabBar())->setTabTheme(index, _theme);
#endif
((CTabBar *)tabBar())->setTabTheme(index, tab_theme);
#ifdef __USE_COLORED_TAB
if ( !isActive() )
_color = "none";
tab_color = "none";
if ( index == currentIndex() ) {
((CTabBar *)tabBar())->setActiveTabColor(_color);
((CTabBar *)tabBar())->setActiveTabColor(tab_color);
((CTabBar *)tabBar())->setUseTabCustomPalette( !(tab_type == etPortal || tab_type == etUndefined) );
}
#endif
}
}
}
@ -781,9 +757,7 @@ void CAscTabWidget::applyDocumentSave(int id, bool cancel)
void CAscTabWidget::applyDocumentChanging(int id, int type)
{
int tabIndex = tabIndexByView(id);
#ifdef __APP_NEW_APPEARANCE
if ( !(tabIndex < 0) )
if ( !(tabIndex < 0) ) {
if ( type == DOCUMENT_CHANGED_LOADING_START ) {
// ((CTabBar *)tabBar())->setTabLoading(tabIndex, true);
return;
@ -803,13 +777,7 @@ void CAscTabWidget::applyDocumentChanging(int id, int type)
return;
}
#else
switch ( type ) {
case DOCUMENT_CHANGED_LOADING_START:
case DOCUMENT_CHANGED_LOADING_FINISH:
case DOCUMENT_CHANGED_PAGE_LOAD_FINISH: return;
}
#endif
CCefView * pView = AscAppManager::getInstance().GetViewById(id);
if (NULL != pView && pView->GetType() == cvwtEditor) {
@ -833,14 +801,11 @@ void CAscTabWidget::applyDocumentChanging(int id, int type)
void CAscTabWidget::setDocumentWebOption(int id, const QString& option)
{
int tabIndex = tabIndexByView(id);
#ifdef __APP_NEW_APPEARANCE
if ( !(tabIndex < 0) )
if ( option == "loading" ) {
CAscTabData * doc = panel(tabIndex)->data();
doc->setEventLoadSupported(true);
}
#endif
}
/*

View File

@ -1366,19 +1366,51 @@ void CMainPanel::updateScaling(int dpiratio)
layoutBtns->setSpacing(1 * dpiratio);
if ( m_isCustomWindow ) {
#ifdef __APP_NEW_APPEARANCE
layoutBtns->setContentsMargins(0,0,0,0);
QSize small_btn_size(40*dpiratio, TOOLBTN_HEIGHT*dpiratio);
#else
layoutBtns->setContentsMargins(0,0,4*dpiratio,0);
QSize small_btn_size(28*dpiratio, TOOLBTN_HEIGHT*dpiratio);
#endif
m_pButtonMinimize->setFixedSize(small_btn_size);
m_pButtonMaximize->setFixedSize(small_btn_size);
m_pButtonClose->setFixedSize(small_btn_size);
}
m_pButtonMain->setGeometry(0, 0, BUTTON_MAIN_WIDTH * dpiratio, TITLE_HEIGHT * dpiratio);
QString _tabs_stylesheets = dpiratio > 1 ? ":/sep-styles/tabbar@2x" : ":/sep-styles/tabbar";
if ( m_isCustomWindow ) {
_tabs_stylesheets += ".qss";
} else {
#ifdef __linux__
_tabs_stylesheets += ".nix.qss";
#endif
}
QFile styleFile(_tabs_stylesheets);
styleFile.open( QFile::ReadOnly );
m_pTabs->setStyleSheet(QString(styleFile.readAll()));
m_pTabs->updateScaling(dpiratio);
styleFile.close();
std::map<int, std::pair<QString, QString> > icons;
if ( dpiratio > 1 ) {
icons.insert({
{etUndefined, std::make_pair(":/tabbar/icons/newdoc@2x.png", ":/tabbar/icons/newdoc@2x.png")},
{etDocument, std::make_pair(":/tabbar/icons/de@2x.png", ":/tabbar/icons/de@2x.png")},
{etPresentation, std::make_pair(":/tabbar/icons/pe@2x.png", ":/tabbar/icons/pe@2x.png")},
{etSpreadsheet, std::make_pair(":/tabbar/icons/se@2x.png", ":/tabbar/icons/se@2x.png")},
{etPortal, std::make_pair(":/tabbar/icons/portal@2x.png", ":/tabbar/icons/portal@2x.png")}
});
} else {
icons.insert({
{etUndefined, std::make_pair(":/tabbar/icons/newdoc.png", ":/tabbar/icons/newdoc.png")},
{etDocument, std::make_pair(":/tabbar/icons/de.png", ":/tabbar/icons/de.png")},
{etPresentation, std::make_pair(":/tabbar/icons/pe.png", ":/tabbar/icons/pe.png")},
{etSpreadsheet, std::make_pair(":/tabbar/icons/se.png", ":/tabbar/icons/se.png")},
{etPortal, std::make_pair(":/tabbar/icons/portal.png", ":/tabbar/icons/portal.png")}
});
}
m_pTabs->setTabIcons(icons);
}
void CMainPanel::onCheckUpdates()

View File

@ -184,9 +184,7 @@ void QTabBarPrivate::setupMovableTab()
QString text = tab.text;
tab.text = "";
p.drawControl(QStyle::CE_TabBarTab, tab);
#ifdef __USE_COLORED_TAB
((CTabBar*)q)->fillTabColor(&p, tab, pressedIndex, ((CTabBar*)q)->m_activeColor);
#endif
((CTabBar*)q)->drawTabCaption(&p, text, tab);
p.end();
@ -239,9 +237,7 @@ CTabBar::CTabBar(QWidget * parent)
{
setDrawBase(false);
#ifdef __APP_NEW_APPEARANCE
connect(this, &QTabBar::currentChanged, this, &CTabBar::onCurrentChanged);
#endif
}
CTabBar::~CTabBar()
@ -348,13 +344,9 @@ void CTabBar::drawTabCaption(QPainter * p, const QString& s, const QStyleOptionT
}
int _factor = scaling();
#ifdef __APP_NEW_APPEARANCE
QPoint _lt = QPoint(15, 0) * _factor;
QPoint _rb = QPoint(-22, -2) * _factor;
#else
QPoint _lt = QPoint(13, 0) * _factor;
QPoint _rb = _factor > 1 ? QPoint(-44, -4) : QPoint(-22, -2);
#endif
QRect trect(t.rect.topLeft() + QPoint(t.iconSize.width(), 0) + _lt,
t.rect.bottomRight() + _rb);
@ -440,11 +432,8 @@ void CTabBar::paintEvent(QPaintEvent * event)
tab.text.clear();
p.drawControl(QStyle::CE_TabBarTab, tab);
#ifdef __USE_COLORED_TAB
if ( m_activeColor != "none" ) {
if ( m_activeColor != "none" )
fillTabColor(&p, tab, selected, m_activeColor);
}
#endif
drawTabCaption(&p, text, tab);
} else {
int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0, this);
@ -539,11 +528,8 @@ void CTabBar::paintEvent(QPaintEvent * event)
tab.text.clear();
p.drawControl(QStyle::CE_TabBarTab, tab);
#ifdef __USE_COLORED_TAB
if ( m_activeColor != "none" ) {
if ( m_activeColor != "none" )
fillTabColor(&p, tab, selected, m_activeColor);
}
#endif
drawTabCaption(&p, text, tab);
} else {
int taboverlap = style()->pixelMetric(QStyle::PM_TabBarTabOverlap, 0, this);
@ -600,7 +586,6 @@ void CTabBar::setUseTabCustomPalette(bool use)
void CTabBar::tabInserted(int index)
{
#ifdef __APP_NEW_APPEARANCE
QToolButton * close = new QToolButton(this);
close->setProperty("class", "tab-close");
close->setFocusPolicy(Qt::NoFocus);
@ -611,7 +596,6 @@ void CTabBar::tabInserted(int index)
connect(close, &QToolButton::clicked, this, &CTabBar::onCloseButton);
setTabButton(index, QTabBar::RightSide, close);
#endif
CAnimatedIcon * icon = new CAnimatedIcon(this);
icon->setFixedSize(iconSize());
@ -667,14 +651,9 @@ void CTabBar::setTabIcon(int index, const QIcon &icon)
int dpi_ratio = scaling();
((CAnimatedIcon *)i)->setPixmap(icon.pixmap(_iconSize));
#ifdef __APP_NEW_APPEARANCE
int top_offset = dpi_ratio > 1 ? 4 : 1;
i->setGeometry(QRect(QPoint(_tabRect.left() + 4, _top - top_offset),_iconSize));
i->setFixedSize(_iconSize.width() + (8 * dpi_ratio), iconSize().height() + (4 * dpi_ratio));
#else
i->setGeometry(QRect(QPoint(_tabRect.left() + 4, _top),_iconSize));
i->setFixedSize(_iconSize.width() + (5 * scaling()), iconSize().height());
#endif
update(_tabRect);
}
@ -695,7 +674,7 @@ void CTabBar::tabStartLoading(int index, const QString& theme)
CAnimatedIcon * icon = (CAnimatedIcon *)TAB_ICON(index);
if ( icon ) {
if ( !icon->isStarted() )
icon->startSvg(":/common/icons/loader.svg", theme);
icon->startSvg(":/tabbar/icons/loader.svg", theme);
}
}
@ -741,6 +720,11 @@ void CTabBar::setTabTheme(int index, TabTheme theme)
}
}
void CTabBar::setActiveTabColor(const QString& color)
{
m_activeColor = color;
}
void CTabBar::changeTabTheme(int index, TabTheme theme)
{
if ( tabData(index).isNull() ) {
@ -807,8 +791,8 @@ void CTabBar::updateScaling(int f)
repaint();
}
bool CTabBar::event(QEvent * e){
#ifdef __APP_NEW_APPEARANCE
bool CTabBar::event(QEvent * e)
{
if ( e->type() == QEvent::HoverMove ) {
Q_D(QTabBar);
@ -846,8 +830,6 @@ bool CTabBar::event(QEvent * e){
}
}
#endif
// qDebug() << "event: " << e;
return QTabBar::event(e);
}

View File

@ -52,6 +52,7 @@ public:
void setTabIcon(int index, const QIcon &icon);
void setTabLoading(int, bool);
void setActiveTabColor(const QString&);
void tabStartLoading(int, const QString& theme = QString());
void activate(bool);
@ -87,20 +88,11 @@ private:
int m_overIndex = -1;
int m_current = -1;
bool m_active = false;
QString m_activeColor = "none";
signals:
void tabUndock(int);
#ifdef __USE_COLORED_TAB
public:
void setActiveTabColor(const QString& color)
{
m_activeColor = color;
}
private:
QString m_activeColor = "none";
#endif
private:
Q_DECLARE_PRIVATE(QTabBar)
};

View File

@ -39,19 +39,11 @@
#define MAIN_WINDOW_MIN_WIDTH 800
#define MAIN_WINDOW_MIN_HEIGHT 600
#ifdef __APP_NEW_APPEARANCE
# define BUTTON_MAIN_WIDTH 112
# define MAIN_WINDOW_BORDER_WIDTH 4
# define WINDOW_TITLE_MIN_WIDTH 200
# define TOOLBTN_HEIGHT 28
# define TITLE_HEIGHT 28
#else
# define BUTTON_MAIN_WIDTH 68
# define MAIN_WINDOW_BORDER_WIDTH 3
# define WINDOW_TITLE_MIN_WIDTH 400
# define TOOLBTN_HEIGHT 29
# define TITLE_HEIGHT 29
#endif
#define BUTTON_MAIN_WIDTH 112
#define MAIN_WINDOW_BORDER_WIDTH 4
#define WINDOW_TITLE_MIN_WIDTH 200
#define TOOLBTN_HEIGHT 28
#define TITLE_HEIGHT 28
namespace WindowBase
{

View File

@ -98,12 +98,17 @@ typedef unsigned char BYTE;
#endif
#ifdef _WIN32
#define WINDOW_BACKGROUND_COLOR RGB(49, 52, 55)
#define TABBAR_BACKGROUND_COLOR QRgb(WINDOW_BACKGROUND_COLOR)
# define WINDOW_BACKGROUND_COLOR RGB(241, 241, 241) // #f1f1f1
# define TABBAR_BACKGROUND_COLOR QRgb(WINDOW_BACKGROUND_COLOR)
#else
#define TABBAR_BACKGROUND_COLOR "#313437"
# define TABBAR_BACKGROUND_COLOR "#f1f1f1"
#endif
#define TAB_COLOR_PRESENTATION "#aa5252"
#define TAB_COLOR_SPREADSHEET "#40865c"
#define TAB_COLOR_DOCUMENT "#446995"
#include "defines_p.h"
#endif // DEFINES_H

View File

@ -65,38 +65,8 @@ void CMainPanelImpl::updateScaling(int dpiratio)
{
CMainPanel::updateScaling(dpiratio);
QString _tabs_stylesheets = dpiratio > 1 ? ":/sep-styles/tabbar@2x" : ":/sep-styles/tabbar";
if ( m_isCustomWindow ) {
_tabs_stylesheets += ".qss";
} else {
#ifdef __linux__
_tabs_stylesheets += ".nix.qss";
#endif
}
QFile styleFile(_tabs_stylesheets);
styleFile.open( QFile::ReadOnly );
m_pTabs->setStyleSheet(QString(styleFile.readAll()));
std::map<int, std::pair<QString, QString> > icons;
if ( dpiratio > 1 ) {
icons.insert({
{etUndefined, std::make_pair(":/newdocument@2x.png", ":/newdocument@2x.png")},
{etDocument, std::make_pair(":/de_normal@2x.png", ":/de_active@2x.png")},
{etPresentation, std::make_pair(":/pe_normal@2x.png", ":/pe_active@2x.png")},
{etSpreadsheet, std::make_pair(":/se_normal@2x.png", ":/se_active@2x.png")},
{etPortal, std::make_pair(":/portal.png", ":/portal@2x.png")}
});
} else {
icons.insert({
{etUndefined, std::make_pair(":/newdocument.png", ":/newdocument.png")},
{etDocument, std::make_pair(":/de_normal.png", ":/de_active.png")},
{etPresentation, std::make_pair(":/pe_normal.png", ":/pe_active.png")},
{etSpreadsheet, std::make_pair(":/se_normal.png", ":/se_active.png")},
{etPortal, std::make_pair(":/portal.png", ":/portal.png")}
});
}
m_pTabs->setTabIcons(icons);
QPixmap pixmap(dpiratio > 1 ? ":/logo@2x.png" : ":/logo.png");
m_pButtonMain->setText(QString());
m_pButtonMain->setIcon(QIcon(pixmap));
m_pButtonMain->setIconSize(pixmap.size());
}

View File

@ -259,7 +259,6 @@ LRESULT CALLBACK CSingleWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam,
return TRUE;
case WM_PAINT: {
#ifdef __APP_NEW_APPEARANCE
RECT rect;
GetClientRect(hWnd, &rect);
@ -278,20 +277,9 @@ LRESULT CALLBACK CSingleWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam,
::SelectObject(hDC, hpenOld);
::EndPaint(hWnd, &ps);
return 0;
#endif
break; }
return 0;}
case WM_ERASEBKGND: {
#ifndef __APP_NEW_APPEARANCE
RECT rect;
GetClientRect(hWnd, &rect);
HBRUSH hBrush = CreateSolidBrush(WINDOW_BACKGROUND_COLOR);
FillRect((HDC)wParam, &rect, (HBRUSH)hBrush);
DeleteObject(hBrush);
#endif
return TRUE; }
case WM_GETMINMAXINFO: {
@ -522,13 +510,8 @@ QWidget * CSingleWindow::createMainPanel(QWidget * parent, bool custom, QWidget
label->setObjectName("labelAppTitle");
label->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
#ifdef __APP_NEW_APPEARANCE
layoutBtns->setContentsMargins(0,0,0,0);
QSize small_btn_size(40*m_dpiRatio, TOOLBTN_HEIGHT*m_dpiRatio);
#else
layoutBtns->setContentsMargins(0, 0, 4*m_dpiRatio, 0);
QSize small_btn_size(28 * m_dpiRatio, TOOLBTN_HEIGHT * m_dpiRatio);
#endif
layoutBtns->setSpacing(1*m_dpiRatio);
layoutBtns->addWidget(label);

View File

@ -412,7 +412,6 @@ qDebug() << "WM_CLOSE";
}
case WM_PAINT: {
#ifdef __APP_NEW_APPEARANCE
RECT rect;
GetClientRect(hWnd, &rect);
@ -431,20 +430,9 @@ qDebug() << "WM_CLOSE";
::SelectObject(hDC, hpenOld);
::EndPaint(hWnd, &ps);
return 0;
#endif
break; }
return 0; }
case WM_ERASEBKGND: {
#ifndef __APP_NEW_APPEARANCE
RECT rect;
GetClientRect(hWnd, &rect);
HBRUSH hBrush = CreateSolidBrush(WINDOW_BACKGROUND_COLOR);
FillRect((HDC)wParam, &rect, (HBRUSH)hBrush);
DeleteObject(hBrush);
#endif
return TRUE; }
case WM_GETMINMAXINFO: