Conversation
mkow
left a comment
There was a problem hiding this comment.
- Please make it visible by default
- When both minimap and node tree are open resizing minimap is not too convenient (because it resizes both panels).
| }; | ||
|
|
||
| explicit VisualizationMinimap(QWidget *parent = 0); | ||
| explicit VisualizationMinimap(bool size_control = true, QWidget *parent = 0); |
There was a problem hiding this comment.
parent should be the first argument (same as you did in MinimapPanel ctor)
There was a problem hiding this comment.
so it is wrong in MinimapPanel , all qt things have it as last argmunet
src/ui/hexeditwidget.cc
Outdated
| connect(hex_edit_, &HexEdit::selectionChanged, | ||
| this, &HexEditWidget::selectionChanged); | ||
|
|
||
| connect(hex_edit_, &HexEdit::visibleRegionChanged, [this] (qint64 start_addr, qint64 region_size) { |
src/ui/hexeditwidget.cc
Outdated
| // show_minimap_act_->setChecked(false); | ||
| // connect(show_minimap_act_, SIGNAL(toggled(bool)), this, | ||
| // SIGNAL(showMinimap(bool))); | ||
| //Currently not implemented |
src/ui/hexeditwidget.cc
Outdated
| // SIGNAL(showMinimap(bool))); | ||
| //Currently not implemented | ||
| show_minimap_act_ = ShortcutsModel::ShortcutsModel::getShortcutsModel()->createQAction( | ||
| util::settings::shortcuts::SHOW_MINIMAP, |
| namespace veles { | ||
| namespace ui { | ||
|
|
||
| const float k_minimap_selection_factor = 10; |
There was a problem hiding this comment.
convention from this component, see trigram.cc
There was a problem hiding this comment.
We'll refactor this old convention in few days (after fixing Jenkins), so insert new code in Google C++ Style
| size_t minimap_size = std::min(static_cast<size_t>(selection_size * grow_factor), full_size); | ||
| minimap_sizes.append(minimap_size); | ||
|
|
||
| size_t offset = start_position % minimap_size; |
There was a problem hiding this comment.
this will crash for an empty file
src/visualization/minimap_panel.cc
Outdated
|
|
||
| size_t offset = start_position % minimap_size; | ||
|
|
||
| // jump to begin if selection overflows bar |
There was a problem hiding this comment.
begin -> beginning
jump -> Jump
bar -> bar.
src/visualization/minimap_panel.cc
Outdated
| offset = 0; | ||
| } | ||
|
|
||
| // fit end of bar to end of data |
src/visualization/minimap_panel.cc
Outdated
| } while (selection_size < full_size); | ||
|
|
||
| int index = 0; | ||
| while(index < minimap_sizes.size()) { |
| do { | ||
| selection_size = std::min(full_size, selection_size); | ||
| minimap_selection_sizes.append(selection_size); | ||
| size_t minimap_size = std::min(static_cast<size_t>(selection_size * grow_factor), full_size); |
There was a problem hiding this comment.
AFAIR we use uint64_t in other places for file pos, this won't work well on 32-bit. Please fix this also in other places in this PR.
There was a problem hiding this comment.
no for minimaps size, see other methods in this file
|
I will prefer to not enable this by defualt:
|
This change is