diff options
| author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-07-28 01:26:13 +0000 |
|---|---|---|
| committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | 2007-07-28 01:26:13 +0000 |
| commit | ed9f48be15cc3ebbf7bc9dd82418b259c4519508 (patch) | |
| tree | 05cc3e3a852cdc4b19a2480f94e6b9ff124ba213 /src | |
| parent | Filter effects dialog: (diff) | |
| download | inkscape-ed9f48be15cc3ebbf7bc9dd82418b259c4519508.tar.gz inkscape-ed9f48be15cc3ebbf7bc9dd82418b259c4519508.zip | |
Filter effects dialog:
* A couple corrections to the way the vertical inputs are displayed and handled.
(bzr r3322)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/filter-effects-dialog.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 5e69fc456..19e6a9d3d 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -741,7 +741,7 @@ bool FilterEffectsDialog::PrimitiveList::on_expose_signal(GdkEventExpose* e) int vis_x, vis_y; tree_to_widget_coords(vis.get_x(), vis.get_y(), vis_x, vis_y); - text_start_x = rct.get_x() + rct.get_width() - _connection_cell.get_text_width() * FPInputConverter.end; + text_start_x = rct.get_x() + rct.get_width() - _connection_cell.get_text_width() * (FPInputConverter.end + 1); for(int i = 0; i < FPInputConverter.end; ++i) { _vertical_layout->set_text(FPInputConverter.get_label((FilterPrimitiveInput)i)); const int x = text_start_x + _connection_cell.get_text_width() * (i + 1); @@ -973,13 +973,14 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton* Gtk::TreeIter target_iter = _model->get_iter(path); target = (*target_iter)[_columns.primitive]; - const int sources_x = CellRendererConnection::size * _model->children().size() + - _connection_cell.get_text_width(); - + Gdk::Rectangle rct; + get_cell_area(path, *col, rct); + const int twidth = _connection_cell.get_text_width(); + const int sources_x = rct.get_width() - twidth * FPInputConverter.end; if(cx > sources_x) { - int src = (cx - sources_x) / _connection_cell.get_text_width(); + int src = (cx - sources_x) / twidth; if(src < 0) - src = 1; + src = 0; else if(src >= FPInputConverter.end) src = FPInputConverter.end - 1; result = FPInputConverter.get_key((FilterPrimitiveInput)src); |
