mirror of https://github.com/aseprite/aseprite.git
				
				
				
			Add "capture" state to style layer states
This commit is contained in:
		
							parent
							
								
									598e50be1d
								
							
						
					
					
						commit
						11dc816878
					
				| 
						 | 
				
			
			@ -666,6 +666,7 @@ void SkinTheme::loadXml(BackwardCompatibility* backward)
 | 
			
		|||
          if (state.find("selected") != std::string::npos) flags |= ui::Style::Layer::kSelected;
 | 
			
		||||
          if (state.find("focus") != std::string::npos) flags |= ui::Style::Layer::kFocus;
 | 
			
		||||
          if (state.find("mouse") != std::string::npos) flags |= ui::Style::Layer::kMouse;
 | 
			
		||||
          if (state.find("capture") != std::string::npos) flags |= ui::Style::Layer::kCapture;
 | 
			
		||||
          layer.setFlags(flags);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,6 +48,7 @@ namespace ui {
 | 
			
		|||
        kFocus = 2,
 | 
			
		||||
        kSelected = 4,
 | 
			
		||||
        kDisabled = 8,
 | 
			
		||||
        kCapture = 16
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      Layer()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,7 +123,8 @@ int PaintWidgetPartInfo::getStyleFlagsForWidget(const Widget* widget)
 | 
			
		|||
    (widget->isEnabled() ? 0: Style::Layer::kDisabled) |
 | 
			
		||||
    (widget->isSelected() ? Style::Layer::kSelected: 0) |
 | 
			
		||||
    (widget->hasMouse() ? Style::Layer::kMouse: 0) |
 | 
			
		||||
    (widget->hasFocus() ? Style::Layer::kFocus: 0);
 | 
			
		||||
    (widget->hasFocus() ? Style::Layer::kFocus: 0) |
 | 
			
		||||
    (widget->hasCapture() ? Style::Layer::kCapture: 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Theme::Theme()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue