Implement variable border widths for pixel/normal

fixes #325
This commit is contained in:
Yaroslav Molochko
2012-09-24 02:14:00 +03:00
committed by Michael Stapelberg
parent b235c469c1
commit 04c58c7325
20 changed files with 144 additions and 73 deletions

View File

@ -69,6 +69,7 @@ my $expected = {
border => 'normal',
'floating_nodes' => $ignore,
workspace_layout => 'default',
current_border_width => -1,
};
# a shallow copy is sufficient, since we only ignore values at the root

View File

@ -36,13 +36,13 @@ is(get_border_style(), 'normal', 'border style normal');
cmd 'border 1pixel';
is(get_border_style(), '1pixel', 'border style 1pixel after changing');
is(get_border_style(), 'pixel', 'border style 1pixel after changing');
# perform an inplace-restart
cmd 'restart';
does_i3_live;
is(get_border_style(), '1pixel', 'border style still 1pixel after restart');
is(get_border_style(), 'pixel', 'border style still 1pixel after restart');
done_testing;

View File

@ -28,7 +28,7 @@ is($nodes[0]->{border}, 'normal', 'border style normal');
cmd 'border 1pixel';
@nodes = @{get_ws_content($tmp)};
is($nodes[0]->{border}, '1pixel', 'border style 1pixel');
is($nodes[0]->{border}, 'pixel', 'border style 1pixel');
cmd 'border none';
@nodes = @{get_ws_content($tmp)};
@ -44,7 +44,7 @@ is($nodes[0]->{border}, 'none', 'border style none');
cmd 'border toggle';
@nodes = @{get_ws_content($tmp)};
is($nodes[0]->{border}, '1pixel', 'border style 1pixel');
is($nodes[0]->{border}, 'pixel', 'border style 1pixel');
cmd 'border toggle';
@nodes = @{get_ws_content($tmp)};

View File

@ -65,7 +65,8 @@ $first = open_window;
@content = @{get_ws_content($tmp)};
ok(@content == 1, 'one container opened');
is($content[0]->{border}, '1pixel', 'border normal by default');
is($content[0]->{border}, 'pixel', 'border pixel by default');
is($content[0]->{current_border_width}, -1, 'border width pixels -1 (default)');
exit_gracefully($pid);
@ -119,7 +120,7 @@ $wscontent = get_ws($tmp);
@floating = @{$wscontent->{floating_nodes}};
ok(@floating == 1, 'one floating container opened');
$floatingcon = $floating[0];
is($floatingcon->{nodes}->[0]->{border}, '1pixel', 'border normal by default');
is($floatingcon->{nodes}->[0]->{border}, 'pixel', 'border pixel by default');
exit_gracefully($pid);