Just looked back and saw that you're pregnant. Also saw that she was waking in the night and calling for you - repeatedly. How did that work out - what did you try, and has that resolved?
So - she's wanting you because she must be sensing a baby is coming, and she feels anxious perhaps? How much fuss is being made to the new one arriving? Is there a new nursery, a lot of preparation, a lot of explaining ... ?
Three is a really hard age for kids to adjust to new things. Two .. they don't really get it still, and 4-5 they are old enough to comprehend things a bit more, and ready to be a bit more independent. Three, they still really want their moms. Dads don't always cut it.
I wouldn't be too concerned about her preferring you at the moment - she gets there is a baby growing in you that's coming and that may 'take her place' possibly (in her mind perhaps). This is time for you to spend with her - I know I did a lot of one-on-one with my kiddos before my babies arrived. My hubby did more with the kids once baby arrived - because I was tending to baby. That's only natural.
As for him giving her cookies and watching TV, my hubby still has chips and movie nights with our kiddos. That's their thing. He's more the fun parent in those ways, and I'm fun in other ways. That's ok. If you don't want him giving her cookies, let him have more healthy snacks you approve of.
This isn't something to really fuss over. It's a time of change and adjustment. A lot of this is perfectly typical. Don't let her see that it concerns you. Your hubby shouldn't either. Maybe he could do some fun outings with her - take her to the library, etc.
ETA: Saw your SWH - so when they are alone, she's better. So that makes sense. Have him do more with her alone. Instead of just watching TV, have him do the things that you do with her. My husband is very hands on, since they were babies. He took them out grocery shopping (especially if I was pregnant) so I could rest, and he'd go take them for special snack afterwards .. fun outing with dad. It could be as simple as that.
I wouldn't tolerate the being rude though - not if it's 'extreme'. Correct that as you would if she was being rude to anyone. She doesn't get to join mom and dad if she's rude e.g. Don't make a big deal (she may want the attention). That behavior would not be tolerated here but preference is typical in phases for some children. Rudeness, not cool.