-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a filter panel #196
base: master
Are you sure you want to change the base?
Add a filter panel #196
Conversation
import tornadofx.launch | ||
|
||
class SolveApp : App(MainView::class) { | ||
class SolveApp : App(MainView::class, ApplicationStylesheet::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have global application style class Style.kt, can we merge them?
const val IconsLayersFilled = "/icons/sidepanel/LayersFilled.png" | ||
const val IconsGrid = "/icons/sidepanel/Grid.png" | ||
const val IconsGridSelected = "/icons/sidepanel/GridSelected.png" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create an issue to convert all icons to svg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
return null | ||
} | ||
|
||
return constraints.first().message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we adding a constraint for a message, it becomes a first element
rippleGenerator.clipSupplier = Supplier { | ||
RippleClipTypeFactory(RippleClipType.CIRCLE).setRadius(radius).build(this) | ||
} | ||
style { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be to global stylesheet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to leave it inside, because we have a radius parameter passed as an argument, which is needed for both the button and the ripple factory when button is pressed. It also ensures that no other set of styles will change the settings of the button created in this function.
attachTo(this@controlButton, op) | ||
} | ||
|
||
fun EventTarget.dialogHeaderLabel(text: String, op: Label.() -> Unit = {}) = label(text) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use it also in ChooserDialog
paddingRight = 20.5 | ||
} | ||
) | ||
Platform.runLater { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure, that it will work always?
} | ||
) | ||
Platform.runLater { | ||
val cellCheckbox = (cell.getChildList()?.firstOrNull { it is CheckBox } as? CheckBox) ?: return@runLater |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be singleOrNull
?
// Needed because when an unselected element is removed, | ||
// the whole selection is recreated with the addition of the remaining elements, | ||
// which value changes causes changes of selectionProperty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not understand at all :(
import solve.filters.settings.model.UIDFilterSetting | ||
import solve.project.model.ProjectFrame | ||
|
||
class Filter(val settings: List<FilterSetting<out Any>>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be make it mutable to avoid problems with list view?
projectController.model.projectProperty.onChange { | ||
applyFilters() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any case when a lot of updates happen at once?
Close #42, close #43, close #181
