Make the color picker cell borders appear correctly in Firefox

This commit is contained in:
ridiculousfish 2012-03-27 19:00:03 -07:00
parent 0bc644abf0
commit a62f300753
2 changed files with 15 additions and 12 deletions

View file

@ -166,9 +166,7 @@ static int handle_child_io( io_data_t *io )
if( io->fd > 2 )
{
/*
Make sure the fd used by this redirection is not used by e.g. a pipe.
*/
/* Make sure the fd used by this redirection is not used by e.g. a pipe. */
free_fd( io, io->fd );
}
@ -242,9 +240,7 @@ static int handle_child_io( io_data_t *io )
case IO_BUFFER:
case IO_PIPE:
{
int write_pipe;
write_pipe = !io->is_input;
unsigned int write_pipe_idx = (io->is_input ? 0 : 1);
/*
debug( 0,
L"%ls %ls on fd %d (%d %d)",
@ -254,7 +250,7 @@ static int handle_child_io( io_data_t *io )
io->param1.pipe_fd[0],
io->param1.pipe_fd[1]);
*/
if( dup2( io->param1.pipe_fd[write_pipe], io->fd ) != io->fd )
if( dup2( io->param1.pipe_fd[write_pipe_idx], io->fd ) != io->fd )
{
debug_safe( 1, LOCAL_PIPE_ERROR );
perror( "dup2" );

View file

@ -230,14 +230,14 @@ body {
}
.colorpicker_term256_cell {
width: 27;
height: 27;
width: 29;
height: 29;
}
.colorpicker_cell_selected {
border: dashed white 3px;
width: 21;
height: 21;
width: 23;
height: 23;
}
.error_msg {
@ -497,6 +497,7 @@ function reflect_style() {
style = current_style()
if (style) {
/* Use this function to make a color that contrasts well with the given color */
var adjust = .5
function compute_constrast(lightness){
var new_lightness = lightness + adjust
@ -969,13 +970,19 @@ function populate_colorpicker_term256() {
for (var subidx = 0; subidx < items_per_row && idx + subidx < term256_colors.length; subidx++) {
cell_style = 'background-color: #' + term256_colors[idx + subidx]
row.append($('<td>', {
var cell = $('<td>', {
class: 'colorpicker_term256_cell',
style: cell_style,
id: 'color_' + term256_colors[idx + subidx],
text: show_labels ? String(subidx + idx + 223) : '',
onClick: 'picked_color_cell(this)'
})
/* For reasons I don't understand, this makes the selected cell border appear in Firefox */
cell.append($('<div>', {
style: 'width: 100%; height: 100%'
}))
row.append(cell)
}
$('#colorpicker_term256').append(row)