| @@ -315,19 +315,26 @@ | ||
| 315 | 315 | ], |
| 316 | 316 | ] |
| 317 | 317 | ); |
| 318 | 318 | |
| 319 | - $this->add_control( | |
| 320 | - 'background_color', | |
| 319 | + $this->add_group_control( | |
| 320 | + Group_Control_Background::get_type(), | |
| 321 | 321 | [ |
| 322 | - 'label' => __( 'Background Color', 'elementor' ), | |
| 323 | - 'type' => Controls_Manager::COLOR, | |
| 324 | - 'global' => [ | |
| 325 | - 'default' => Global_Colors::COLOR_ACCENT, | |
| 322 | + 'name' => 'background', | |
| 323 | + 'label' => __( 'Background', 'elementor' ), | |
| 324 | + 'types' => [ 'classic', 'gradient' ], | |
| 325 | + 'exclude' => [ 'image' ], | |
| 326 | + 'selector' => '{{WRAPPER}} .elementor-button', | |
| 327 | + 'fields_options' => [ | |
| 328 | + 'background' => [ | |
| 329 | + 'default' => 'classic', | |
| 330 | + ], | |
| 331 | + 'color' => [ | |
| 332 | + 'global' => [ | |
| 333 | + 'default' => Global_Colors::COLOR_ACCENT, | |
| 334 | + ], | |
| 335 | + ], | |
| 326 | 336 | ], |
| 327 | - 'selectors' => [ | |
| 328 | - '{{WRAPPER}} .elementor-button' => 'background-color: {{VALUE}};', | |
| 329 | - ], | |
| 330 | 337 | ] |
| 331 | 338 | ); |
| 332 | 339 | |
| 333 | 340 | $this->end_controls_tab(); |
| @@ -350,15 +357,20 @@ | ||
| 350 | 357 | ], |
| 351 | 358 | ] |
| 352 | 359 | ); |
| 353 | 360 | |
| 354 | - $this->add_control( | |
| 355 | - 'button_background_hover_color', | |
| 361 | + $this->add_group_control( | |
| 362 | + Group_Control_Background::get_type(), | |
| 356 | 363 | [ |
| 357 | - 'label' => __( 'Background Color', 'elementor' ), | |
| 358 | - 'type' => Controls_Manager::COLOR, | |
| 359 | - 'selectors' => [ | |
| 360 | - '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus' => 'background-color: {{VALUE}};', | |
| 364 | + 'name' => 'button_background_hover', | |
| 365 | + 'label' => __( 'Background', 'elementor' ), | |
| 366 | + 'types' => [ 'classic', 'gradient' ], | |
| 367 | + 'exclude' => [ 'image' ], | |
| 368 | + 'selector' => '{{WRAPPER}} .elementor-button:hover, {{WRAPPER}} .elementor-button:focus', | |
| 369 | + 'fields_options' => [ | |
| 370 | + 'background' => [ | |
| 371 | + 'default' => 'classic', | |
| 372 | + ], | |
| 361 | 373 | ], |
| 362 | 374 | ] |
| 363 | 375 | ); |
| 364 | 376 | |