mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
Minor changes.
This commit is contained in:
@@ -490,7 +490,7 @@ ComboBox::Button:hover {
|
||||
}
|
||||
|
||||
SpinBox::btndown {
|
||||
width: 12dp;
|
||||
width: 16dp;
|
||||
height: 12dp;
|
||||
foreground-image: poly(line, var(--icon), "1dp 4dp, 5dp 7dp"), poly(line, var(--icon), "5dp 7dp, 9dp 4dp");
|
||||
}
|
||||
@@ -500,7 +500,7 @@ SpinBox::btndown:hover {
|
||||
}
|
||||
|
||||
SpinBox::btnup {
|
||||
width: 12dp;
|
||||
width: 16dp;
|
||||
height: 12dp;
|
||||
foreground-image: poly(line, var(--icon), "1dp 7dp, 5dp 4dp"), poly(line, var(--icon), "5dp 4dp, 9dp 7dp");
|
||||
}
|
||||
@@ -513,10 +513,6 @@ WinMenu {
|
||||
height: 24dp;
|
||||
}
|
||||
|
||||
WinMenu {
|
||||
padding-left: 4dp;
|
||||
}
|
||||
|
||||
Menu,
|
||||
PopUpMenu {
|
||||
background-color: var(--menu-back);
|
||||
@@ -549,14 +545,12 @@ Menu::SubMenu {
|
||||
|
||||
Menu::Item:hover,
|
||||
Menu::CheckBox:hover,
|
||||
Menu::Separator:hover,
|
||||
Menu::SubMenu:hover {
|
||||
background-color: var(--primary);
|
||||
}
|
||||
|
||||
Menu::Item::text,
|
||||
Menu::CheckBox::text,
|
||||
Menu::Separator::text,
|
||||
Menu::SubMenu::text {
|
||||
padding-right: 4dp;
|
||||
color: var(--menu-font);
|
||||
@@ -579,8 +573,11 @@ Tab:pressed {
|
||||
}
|
||||
|
||||
Menu::Separator {
|
||||
height: 1dp;
|
||||
background-color: var(--button-border);
|
||||
height: 3dp;
|
||||
background-color: var(--button-back);
|
||||
background-image: rectangle(solid, var(--button-border));
|
||||
background-size: 100% 1dp;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
:root {
|
||||
|
||||
@@ -88,6 +88,10 @@ class EE_API UISceneNode : public SceneNode {
|
||||
|
||||
void setIsLoading( bool isLoading );
|
||||
|
||||
void updateDirtyStyles();
|
||||
|
||||
void updateDirtyStyleStates();
|
||||
|
||||
protected:
|
||||
friend class EE::UI::UIWindow;
|
||||
friend class EE::UI::UIWidget;
|
||||
|
||||
@@ -379,25 +379,9 @@ void UISceneNode::update( const Time& elapsed ) {
|
||||
|
||||
SceneNode::update( elapsed );
|
||||
|
||||
if ( !mDirtyStyle.empty() ) {
|
||||
Clock clock;
|
||||
for ( auto& node : mDirtyStyle ) {
|
||||
node->reloadStyle( true, false, false );
|
||||
}
|
||||
mDirtyStyle.clear();
|
||||
eePRINTL( "CSS Styles Reloaded in %.2f ms", clock.getElapsedTime().asMilliseconds() );
|
||||
}
|
||||
updateDirtyStyles();
|
||||
|
||||
if ( !mDirtyStyleState.empty() ) {
|
||||
Clock clock;
|
||||
for ( auto& node : mDirtyStyleState ) {
|
||||
node->reportStyleStateChangeRecursive( mDirtyStyleStateCSSAnimations[node] );
|
||||
}
|
||||
mDirtyStyleState.clear();
|
||||
mDirtyStyleStateCSSAnimations.clear();
|
||||
eePRINTL( "CSS Style State Invalidated, reapplied state in %.2f ms",
|
||||
clock.getElapsedTime().asMilliseconds() );
|
||||
}
|
||||
updateDirtyStyleStates();
|
||||
|
||||
SceneManager::instance()->setCurrentUISceneNode( uiSceneNode );
|
||||
}
|
||||
@@ -513,6 +497,30 @@ void UISceneNode::setIsLoading( bool isLoading ) {
|
||||
mIsLoading = isLoading;
|
||||
}
|
||||
|
||||
void UISceneNode::updateDirtyStyles() {
|
||||
if ( !mDirtyStyle.empty() ) {
|
||||
Clock clock;
|
||||
for ( auto& node : mDirtyStyle ) {
|
||||
node->reloadStyle( true, false, false );
|
||||
}
|
||||
mDirtyStyle.clear();
|
||||
eePRINTL( "CSS Styles Reloaded in %.2f ms", clock.getElapsedTime().asMilliseconds() );
|
||||
}
|
||||
}
|
||||
|
||||
void UISceneNode::updateDirtyStyleStates() {
|
||||
if ( !mDirtyStyleState.empty() ) {
|
||||
Clock clock;
|
||||
for ( auto& node : mDirtyStyleState ) {
|
||||
node->reportStyleStateChangeRecursive( mDirtyStyleStateCSSAnimations[node] );
|
||||
}
|
||||
mDirtyStyleState.clear();
|
||||
mDirtyStyleStateCSSAnimations.clear();
|
||||
eePRINTL( "CSS Style State Invalidated, reapplied state in %.2f ms",
|
||||
clock.getElapsedTime().asMilliseconds() );
|
||||
}
|
||||
}
|
||||
|
||||
bool UISceneNode::onMediaChanged() {
|
||||
if ( !mStyleSheet.isMediaQueryListEmpty() ) {
|
||||
MediaFeatures media;
|
||||
|
||||
@@ -44,13 +44,13 @@ UIWidget::UIWidget( const std::string& tag ) :
|
||||
mAttributesTransactionCount( 0 ) {
|
||||
mNodeFlags |= NODE_FLAG_WIDGET;
|
||||
|
||||
createStyle();
|
||||
|
||||
if ( NULL != mUISceneNode && !isSceneNodeLoading() && !isLoadingState() ) {
|
||||
mUISceneNode->invalidateStyle( this );
|
||||
mUISceneNode->invalidateStyleState( this, true );
|
||||
}
|
||||
|
||||
createStyle();
|
||||
|
||||
updateAnchorsDistances();
|
||||
}
|
||||
|
||||
@@ -963,8 +963,9 @@ void UIWidget::onMarginChange() {
|
||||
void UIWidget::onThemeLoaded() {}
|
||||
|
||||
void UIWidget::onParentChange() {
|
||||
if ( !isSceneNodeLoading() && !isLoadingState() )
|
||||
if ( !isSceneNodeLoading() && !isLoadingState() ) {
|
||||
getUISceneNode()->invalidateStyle( this );
|
||||
}
|
||||
}
|
||||
|
||||
void UIWidget::onClassChange() {
|
||||
|
||||
Reference in New Issue
Block a user