mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
feat(control): allow subbuttons of free orientation drawer change size
This commit is contained in:
parent
403c962ed2
commit
67a3cc5dc0
@ -88,7 +88,7 @@ public class ControlDrawer extends ControlButton {
|
||||
|
||||
|
||||
private void resizeButtons(){
|
||||
if (buttons == null) return;
|
||||
if (buttons == null || drawerData.orientation == ControlDrawerData.Orientation.FREE) return;
|
||||
for(ControlSubButton subButton : buttons){
|
||||
subButton.mProperties.setWidth(mProperties.getWidth());
|
||||
subButton.mProperties.setHeight(mProperties.getHeight());
|
||||
|
@ -21,8 +21,10 @@ public class ControlSubButton extends ControlButton {
|
||||
}
|
||||
|
||||
private void filterProperties(){
|
||||
if (parentDrawer != null && parentDrawer.drawerData.orientation != ControlDrawerData.Orientation.FREE) {
|
||||
mProperties.setHeight(parentDrawer.getProperties().getHeight());
|
||||
mProperties.setWidth(parentDrawer.getProperties().getWidth());
|
||||
}
|
||||
mProperties.isDynamicBtn = false;
|
||||
|
||||
setProperties(mProperties, false);
|
||||
@ -35,7 +37,7 @@ public class ControlSubButton extends ControlButton {
|
||||
|
||||
@Override
|
||||
public void setLayoutParams(ViewGroup.LayoutParams params) {
|
||||
if(parentDrawer != null){
|
||||
if(parentDrawer != null && parentDrawer.drawerData.orientation != ControlDrawerData.Orientation.FREE){
|
||||
params.width = (int)parentDrawer.mProperties.getWidth();
|
||||
params.height = (int)parentDrawer.mProperties.getHeight();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user